<!DOCTYPE html><html class="hide-aside" lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><title>糖果屋微调合集 | Akilarの糖果屋</title><meta name="keywords" content="📁Hexo,🦋Butterfly"><meta name="author" content="Akilar"><meta name="copyright" content="Akilar"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="将本站针对butterfly主题的亿点点小改动做个集锦。"><meta property="og:type" content="article"><meta property="og:title" content="糖果屋微调合集"><meta property="og:url" content="https://akilar.top/posts/23fdf850/"><meta property="og:site_name" content="Akilarの糖果屋"><meta property="og:description" content="将本站针对butterfly主题的亿点点小改动做个集锦。"><meta property="og:locale" content="zh_CN"><meta property="og:image" content="https://npm.elemecdn.com/akilar-candyassets/image/20201115152231.png"><meta property="article:published_time" content="2021-01-21T08:49:55.000Z"><meta property="article:modified_time" content="2022-04-06T09:06:04.000Z"><meta property="article:author" content="Akilar"><meta property="article:tag" content="📁Hexo"><meta property="article:tag" content="🦋Butterfly"><meta name="twitter:card" content="summary"><meta name="twitter:image" content="https://npm.elemecdn.com/akilar-candyassets/image/20201115152231.png"><link rel="shortcut icon" href="https://npm.elemecdn.com/akiblog@1.0.1/img/siteicon/favicon.png"><link rel="canonical" href="https://akilar.top/posts/23fdf850/" media="defer" onload='this.media="all"'><link rel="preconnect" href="//cdn.jsdelivr.net"><link rel="preconnect" href="//at.alicdn.com/"><link rel="preconnect" href="//cdnjs.cloudflare.com/"><link rel="preconnect" href="//sdk.51.la"><meta name="google_site_verification" content="INnh6jnldNB3hxjSoa9ut7Kd9xX9R6Mqe7807EJsbCc"><meta name="baidu-site-verification" content="code-6O1kXu3a70"><meta name="msvalidate.01" content="3A07763DBFF970229752E8DF7999C30D"><link rel="manifest" href="/manifest.json"><link rel="apple-touch-icon" sizes="180x180" href="https://npm.elemecdn.com/akiblog@1.0.1/img/image/siteicon/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="https://npm.elemecdn.com/akiblog@1.0.1/img/siteicon/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="https://npm.elemecdn.com/akiblog@1.0.1/img/siteicon/favicon-16x16.png"><link rel="mask-icon" href="https://npm.elemecdn.com/akiblog@1.0.1/img/siteicon/safari-pinned-tab.svg" color="#5bbad5"><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://npm.elemecdn.com/@fortawesome/fontawesome-free@6.1.2/css/all.min.css" media="print" onload='this.media="all"'><link rel="stylesheet" href="https://npm.elemecdn.com/node-snackbar@0.1.16/dist/snackbar.min.css" media="print" onload='this.media="all"'><div class="js-pjax"><script charset="UTF-8" id="LA_COLLECT" src="https://sdk.51.la/js-sdk-pro.min.js"></script><script>LA.init({id:"JdyxkljyWpUOuTqt",ck:"JdyxkljyWpUOuTqt"})</script></div><script src="https://sdk.51.la/perf/js-sdk-perf.min.js" crossorigin="anonymous"></script><script>(new LingQue.Monitor).init({id:"JdzAJUCrdUGoOC7D"})</script><link rel="stylesheet" href="https://npm.elemecdn.com/akiblog@1.0.1/css/animate.min.css" media="print" onload='this.media="screen"'><link rel="stylesheet" href="https://npm.elemecdn.com/swiper@8.4.2/swiper-bundle.min.css" media="print" onload='this.media="all"'><script>const GLOBAL_CONFIG={root:"/",algolia:{appId:"STO7Z288QA",apiKey:"dbcfd77c89c49f19b42d68e572943881",indexName:"akilar",hits:{per_page:3},languages:{input_placeholder:"搜索文章",hits_empty:"找不到您查询的内容：${query}",hits_stats:"找到 ${hits} 条结果，用时 ${time} 毫秒"}},localSearch:void 0,translate:{defaultEncoding:2,translateDelay:0,msgToTraditionalChinese:"<i>繁</i><sapn>簡繁轉換</span>",msgToSimplifiedChinese:"<i>简</i><sapn>简繁转换</span>"},noticeOutdate:{limitDay:30,position:"top",messagePrev:"It has been",messageNext:"days since the last update, the content of the article may be outdated."},highlight:{plugin:"highlighjs",highlightCopy:!0,highlightLang:!0,highlightHeightLimit:130},copy:{success:"吾辈宣布你的剪贴板已经被我占领啦！",error:"抱歉，复制好像出了点问题。",noSupport:"你的浏览器好像不支持"},relativeDate:{homepage:!1,post:!1},runtime:"天",date_suffix:{just:"刚刚",min:"分钟前",hour:"小时前",day:"天前",month:"个月前"},copyright:void 0,lightbox:"mediumZoom",Snackbar:{chs_to_cht:"你已切换为繁体",cht_to_chs:"你已切换为简体",day_to_night:"你已切换为深色模式",night_to_day:"你已切换为浅色模式",bgLight:"#49B1F5",bgDark:"#1f1f1f",position:"top-center"},source:{justifiedGallery:{js:"https://npm.elemecdn.com/flickr-justified-gallery@2.1.2/dist/fjGallery.min.js",css:"https://npm.elemecdn.com/flickr-justified-gallery@2.1.2/dist/fjGallery.css"}},isPhotoFigcaption:!0,islazyload:!0,isAnchor:!1}</script><script id="config-diff">var GLOBAL_CONFIG_SITE={title:"糖果屋微调合集",isPost:!0,isHome:!1,isHighlightShrink:!1,isToc:!0,postUpdate:"2022-04-06 09:06:04"}</script><noscript><style>#nav{opacity:1}.justified-gallery img{opacity:1}#post-meta time,#recent-posts time{display:inline!important}</style></noscript><script>(e=>{e.saveToLocal={set:function(e,t,o){if(0===o)return;const a=864e5*o,n={value:t,expiry:(new Date).getTime()+a};localStorage.setItem(e,JSON.stringify(n))},get:function(e){const t=localStorage.getItem(e);if(!t)return;const o=JSON.parse(t);if(!((new Date).getTime()>o.expiry))return o.value;localStorage.removeItem(e)}},e.getScript=e=>new Promise((t,o)=>{const a=document.createElement("script");a.src=e,a.async=!0,a.onerror=o,a.onload=a.onreadystatechange=function(){const e=this.readyState;e&&"loaded"!==e&&"complete"!==e||(a.onload=a.onreadystatechange=null,t())},document.head.appendChild(a)}),e.activateDarkMode=function(){document.documentElement.setAttribute("data-theme","dark"),null!==document.querySelector('meta[name="theme-color"]')&&document.querySelector('meta[name="theme-color"]').setAttribute("content","#0d0d0d")},e.activateLightMode=function(){document.documentElement.setAttribute("data-theme","light"),null!==document.querySelector('meta[name="theme-color"]')&&document.querySelector('meta[name="theme-color"]').setAttribute("content","#ffffff")};const t=saveToLocal.get("theme"),o=(new Date).getHours();void 0===t?o<=6||o>=18?activateDarkMode():activateLightMode():"light"===t?activateLightMode():activateDarkMode();const a=saveToLocal.get("aside-status");void 0!==a&&("hide"===a?document.documentElement.classList.add("hide-aside"):document.documentElement.classList.remove("hide-aside"));/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)&&document.documentElement.classList.add("apple")})(window)</script><link rel="stylesheet" href="https://npm.elemecdn.com/akiblog@1.0.1/css/custom.css" media="defer" onload='this.media="all"'><link rel="stylesheet" href="https://widget.heweather.net/simple/static/css/he-simple.css?v=1.4.0" media="defer" onload='this.media="all"'><script src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/SAO-Notify.js" async></script><script async src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/carousel-touch.js"></script><svg aria-hidden="true" style="position:absolute;overflow:hidden;width:0;height:0"><symbol id="icon-sun" viewBox="0 0 1024 1024"><path d="M960 512l-128 128v192h-192l-128 128-128-128H192v-192l-128-128 128-128V192h192l128-128 128 128h192v192z" fill="#FFD878" p-id="8420"></path><path d="M736 512a224 224 0 1 0-448 0 224 224 0 1 0 448 0z" fill="#FFE4A9" p-id="8421"></path><path d="M512 109.248 626.752 224H800v173.248L914.752 512 800 626.752V800h-173.248L512 914.752 397.248 800H224v-173.248L109.248 512 224 397.248V224h173.248L512 109.248M512 64l-128 128H192v192l-128 128 128 128v192h192l128 128 128-128h192v-192l128-128-128-128V192h-192l-128-128z" fill="#4D5152" p-id="8422"></path><path d="M512 320c105.888 0 192 86.112 192 192s-86.112 192-192 192-192-86.112-192-192 86.112-192 192-192m0-32a224 224 0 1 0 0 448 224 224 0 0 0 0-448z" fill="#4D5152" p-id="8423"></path></symbol><symbol id="icon-moon" viewBox="0 0 1024 1024"><path d="M611.370667 167.082667a445.013333 445.013333 0 0 1-38.4 161.834666 477.824 477.824 0 0 1-244.736 244.394667 445.141333 445.141333 0 0 1-161.109334 38.058667 85.077333 85.077333 0 0 0-65.066666 135.722666A462.08 462.08 0 1 0 747.093333 102.058667a85.077333 85.077333 0 0 0-135.722666 65.024z" fill="#FFB531" p-id="11345"></path><path d="M329.728 274.133333l35.157333-35.157333a21.333333 21.333333 0 1 0-30.165333-30.165333l-35.157333 35.157333-35.114667-35.157333a21.333333 21.333333 0 0 0-30.165333 30.165333l35.114666 35.157333-35.114666 35.157334a21.333333 21.333333 0 1 0 30.165333 30.165333l35.114667-35.157333 35.157333 35.157333a21.333333 21.333333 0 1 0 30.165333-30.165333z" fill="#030835" p-id="11346"></path></symbol></svg><link rel="stylesheet" href="https://npm.elemecdn.com/hexo-filter-gitcalendar/lib/gitcalendar.css" media="print" onload='this.media="all"'><meta name="generator" content="Hexo 6.2.0"><link rel="alternate" href="/atom.xml" title="Akilarの糖果屋" type="application/atom+xml"></head><body><div id="loading-box"><div class="ark-loading" id="ark-loading"><div class="ark-loading-top-container"><div class="ark-loading-top-left-flash"></div><div class="ark-loading-top-left-border"></div><div class="ark-loading-top-triangle"></div><div class="ark-loading-top-right-border"></div><div class="ark-loading-top-right-flash"></div></div><div class="ark-loading-bottom-container"><div class="ark-loading-bottom-left-border"></div><div class="ark-loading-bottom-left-triangle"></div><div class="ark-loading-bottom-center-border"></div><div class="ark-loading-bottom-right-triangle"></div><div class="ark-loading-bottom-right-border"></div></div><div class="ark-loading-main-container"><div class="ark-loading-content"><div class="ark-loading-power-left"></div><div class="ark-loading-center-left-border"></div><div class="ark-loading-cab-outside-border"><div class="ark-loading-cab-insideborder"><div class="ark-loading-cab-container"><div class="ark-loading-percentage"></div><div class="ark-loading-tip"></div></div></div></div><div class="ark-loading-center-right-border"></div><div class="ark-loading-power-right"></div></div></div></div></div><div id="web_bg"><style>#web_bg{background:url(https://npm.elemecdn.com/akilar-candyassets/image/background.webp)!important;background-attachment:local!important;background-position:center!important;background-size:cover!important;background-repeat:no-repeat!important}[data-theme=dark] #web_bg{background:url(https://npm.elemecdn.com/akilar-candyassets/image/subshine.webp)!important;background-attachment:local!important;background-position:center!important;background-size:cover!important;background-repeat:no-repeat!important}</style></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="" data-lazy-src="https://npm.elemecdn.com/akiblog@1.0.1/img/author.webp" onerror='onerror=null,src="https://npm.elemecdn.com/akiblog@1.0.1/img/404.gif"' alt="avatar"></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">480</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">63</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">6</div></a></div><hr><div class="menus_items"><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-laptop"></use></svg> <span>博客</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/archives/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-Calendar"></use></svg> <span>时间轴</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/tags/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-strategy"></use></svg> <span>标签</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/fcircle/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-forumdiscusstion"></use></svg> <span>朋友圈</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/link/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-connection"></use></svg> <span>友人帐</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/comments/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-letter"></use></svg> <span>留言板</span></a></div><div class="menus_item"><a class="site-page group faa-parent animated-hover" href="javascript:void(0);" rel="external nofollow noreferrer"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-hourglass"></use></svg> <span>生活</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="faa-parent animated-hover site-page child" href="/gallery/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-strategy"></use></svg> <span>相册</span></a></li><li><a class="faa-parent animated-hover site-page child" href="/bangumis/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-unicorn"></use></svg> <span>追番</span></a></li><li><a class="faa-parent animated-hover site-page child" href="/about/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-Achievement"></use></svg> <span>关于</span></a></li></ul></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="javascript:toRandomPost()" rel="external nofollow noreferrer"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-teamwork"></use></svg> <span>随便看看</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image:url(https://npm.elemecdn.com/akilar-candyassets/image/20201115152231.png)"><div class="menu-container" id="menu-container"><div class="menu-item"><div class="menu-item-main"><a class="site-page faa-parent animated-hover" href="/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-laptop"></use></svg> <span>博客</span></a></div><div class="menu-item-main"><a class="site-page faa-parent animated-hover" href="/archives/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-Calendar"></use></svg> <span>时间轴</span></a></div><div class="menu-item-main"><a class="site-page faa-parent animated-hover" href="/tags/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-strategy"></use></svg> <span>标签</span></a></div><div class="menu-item-main"><a class="site-page faa-parent animated-hover" href="/fcircle/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-forumdiscusstion"></use></svg> <span>朋友圈</span></a></div><div class="menu-item-main"><a class="site-page faa-parent animated-hover" href="/link/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-connection"></use></svg> <span>友人帐</span></a></div><div class="menu-item-main"><a class="site-page faa-parent animated-hover" href="/comments/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-letter"></use></svg> <span>留言板</span></a></div><div class="menu-item-main has-child"><div class="menu-item-parent"><a class="site-page faa-parent animated-hover" href="javascript:void(0);" rel="external nofollow noreferrer"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-hourglass"></use></svg> <span>生活</span></a></div><div class="menu-item-child"><a class="faa-parent animated-hover site-page child" href="/gallery/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-strategy"></use></svg> <span>相册</span></a></div><div class="menu-item-child"><a class="faa-parent animated-hover site-page child" href="/bangumis/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-unicorn"></use></svg> <span>追番</span></a></div><div class="menu-item-child"><a class="faa-parent animated-hover site-page child" href="/about/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-Achievement"></use></svg> <span>关于</span></a></div></div><div class="menu-item-main"><a class="site-page faa-parent animated-hover" href="javascript:toRandomPost()" rel="external nofollow noreferrer"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-teamwork"></use></svg> <span>随便看看</span></a></div></div><div class="top-bar"><div class="message-container"><div class="message-item message-weather" onclick="btf.scrollToDest(0,500)"><div class="message-weather-box" id="he-plugin-simple"></div></div><div class="message-item message-date" onclick="Navvisible()"><div class="message-date-box" id="message-date-box"></div><div class="message-title-box" id="message-title-box"><a id="site-name" title="将本站针对butterfly主题的亿点点小改动做个集锦。">持续更新ing...</a></div></div><div class="message-item message-function"><div id="search-button"><a class="site-page social-icon search faa-parent animated-hover"><svg class="faa-tada icon" style="height:25px;width:25px" aria-hidden="true"><use xlink:href="#icon-analitic"></use></svg> <span>搜索</span></a></div><a class="icon-V hidden faa-parent animated-hover" onclick="switchNightMode()" title="昼夜切换"><svg class="faa-tada" width="25" height="25" viewBox="0 0 1024 1024"><use id="modeicon" xlink:href="#icon-moon"></use></svg></a><div id="toggle-menu"><a class="site-page faa-parent animated-hover"><svg class="faa-tada icon" style="height:25px;width:25px" aria-hidden="true"><use xlink:href="#icon-MobileApps"></use></svg></a></div></div></div></div><button class="active-button" onclick="Navvisible()"></button></div><div id="post-info"><h1 class="post-title">糖果屋微调合集<a class="post-edit-link" href="https://github.com/Akilarlxh/Hexo-blog-source/edit/master/source/_posts/Akilarの糖葫芦/美化日记/糖果屋微调合集.md" rel="external nofollow noreferrer" title="编辑" target="_blank"><i class="fas fa-feather-alt faa-tada animated-hover"></i></a></h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2021-01-21T08:49:55.000Z" title="发表于 2021-01-21 08:49:55">2021-01-21</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2022-04-06T09:06:04.000Z" title="更新于 2022-04-06 09:06:04">2022-04-06</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/%F0%9F%8D%A1Akilar%E3%81%AE%E7%B3%96%E8%91%AB%E8%8A%A6/">🍡Akilarの糖葫芦</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">14.1k</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>71分钟</span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><details class="folding-tag" cyan><summary>点击查看更新记录</summary><div class="content"><div class="timeline undefined"><div class="timeline-item headline"><div class="timeline-item-title"><div class="item-circle"><p>更新记录</p></div></div></div><div class="timeline-item"><div class="timeline-item-title"><div class="item-circle"><p>2022-04-06:调整首页页码样式</p></div></div><div class="timeline-item-content"><ol><li>调整首页页码样式。</li></ol></div></div><div class="timeline-item"><div class="timeline-item-title"><div class="item-circle"><p>2022-01-18:左上角标题新增最大宽度</p></div></div><div class="timeline-item-content"><ol><li>对于768px以上的宽屏设备，设置描述窗最大宽度，防止横幅霸屏。</li></ol></div></div><div class="timeline-item"><div class="timeline-item-title"><div class="item-circle"><p>2022-01-14:方案更新警告</p></div></div><div class="timeline-item-content"><ol><li>iconfont的fontclass现已支持直接使用多彩色图标。</li><li>symbol依然可用，但是考虑到魔改源码未必适合所有人，推荐还是用fontclass方式。</li><li>详情请见<a href="/posts/d2ebecef/">Hexo引入阿里矢量图标库-iconfont inject</a></li><li>总体上fontclass最适合萌新入门，而symbol则为长期最优解</li></ol></div></div><div class="timeline-item"><div class="timeline-item-title"><div class="item-circle"><p>2021-11-20:更新投币效果</p></div></div><div class="timeline-item-content"><ol><li>新增媒体选择，因为手机端悬停时二维码会遮挡投币动画，手机端点击逻辑矛盾无解，故手机端不再启动动画。</li><li>新增投币音效，支持自行配置音频文件。</li></ol></div></div><div class="timeline-item"><div class="timeline-item-title"><div class="item-circle"><p>2021-04-18:新增四背景方案</p></div></div><div class="timeline-item-content"><ol><li>PC端日间夜间，手机端日间夜间，共有四个背景。</li><li>但是高度耦合，不利于后续升级主题。</li><li>且和自定义单页背景方案存在一定冲突。</li><li>个人不是很建议两者并用。</li></ol></div></div><div class="timeline-item"><div class="timeline-item-title"><div class="item-circle"><p>2021-04-18:重写自定义背景方案</p></div></div><div class="timeline-item-content"><ol><li>增加夜间模式图片定义配置项。</li><li>切换夜间模式时换为夜间模式背景。</li></ol></div></div><div class="timeline-item"><div class="timeline-item-title"><div class="item-circle"><p>2021-04-18:修复每页自定义背景的背景的pjax bug</p></div></div><div class="timeline-item-content"><ol><li>感谢@<a target="_blank" rel="noopener external nofollow noreferrer" href="https://toxics1udge.github.io/">Toxic</a>的反馈。</li><li>修复背景变化后不刷新的bug。</li><li>具体化示例描述。</li></ol></div></div><div class="timeline-item"><div class="timeline-item-title"><div class="item-circle"><p>2021-04-18:修复每页自定义背景的背景样式BUG</p></div></div><div class="timeline-item-content"><ol><li>感谢@<a target="_blank" rel="noopener external nofollow noreferrer" href="http://huangxiaokai.cn/">篁竹水声</a>的反馈。</li><li>单页自定义背景在内联样式中重新定义图片，导致css外链样式中的几行定位属性失效。</li><li>重新在内联样式中添加一遍四行定位属性。</li></ol></div></div><div class="timeline-item"><div class="timeline-item-title"><div class="item-circle"><p>2021-04-13:新增social卡片彩色iconfont引入教程</p></div></div><div class="timeline-item-content"><ol><li>重写social.pug,增加判断机制，实现和fontawesome的共存兼容。</li><li>提供适配fontawesome-animation的改写方案。</li><li>social的写法格式调整至与menu_item一致。</li></ol></div></div><div class="timeline-item"><div class="timeline-item-title"><div class="item-circle"><p>2021-04-07:新增菜单栏彩色iconfont引入教程</p></div></div><div class="timeline-item-content"><ol><li>改写menu_item.pug,增加判断机制，实现和fontawesome的共存兼容。</li><li>提供适配fontawesome-animation的改写方案。</li></ol></div></div><div class="timeline-item"><div class="timeline-item-title"><div class="item-circle"><p>2021-03-30:新增单页自定义背景教程</p></div></div><div class="timeline-item-content"><ol><li>微调主题页面背景的显示逻辑，使得可以在markdown文件的front-matter中单独配置页面背景。</li></ol></div></div><div class="timeline-item"><div class="timeline-item-title"><div class="item-circle"><p>2021-02-07:追加修复手机顶栏样式bug</p></div></div><div class="timeline-item-content"><ol><li>使用左上角标题魔改内容以后，有概率出现手机端切换页面时，手机端侧栏菜单变成PC端顶栏菜单。追加修复样式。</li></ol></div></div><div class="timeline-item"><div class="timeline-item-title"><div class="item-circle"><p>2021-02-05:新增主页文章封面节日挂件效果</p></div></div><div class="timeline-item-content"><ol><li>修改首页文章封面，配合iconfont彩色图标，提供节日挂件效果。</li></ol></div></div><div class="timeline-item"><div class="timeline-item-title"><div class="item-circle"><p>2021-02-04:更新页脚振翅蝴蝶动效魔改</p></div></div><div class="timeline-item-content"><ol><li>修改页脚版权声明内容，在中间放上振翅蝴蝶动画。</li></ol></div></div><div class="timeline-item"><div class="timeline-item-title"><div class="item-circle"><p>2021-01-29:更新页面左上角标题魔改</p></div></div><div class="timeline-item-content"><ol><li>新增副标题判断机制</li></ol></div></div><div class="timeline-item"><div class="timeline-item-title"><div class="item-circle"><p>2021-01-21:更新打赏按钮投币动画魔改</p></div></div><div class="timeline-item-content"><ol><li>打赏按钮新增投币动画</li><li>修复了主题现有的若打赏提示语过长，悬停色条填充长度不满的bug。</li><li>修复了复数打赏二维码时样式纵列的bug。</li></ol></div></div><div class="timeline-item"><div class="timeline-item-title"><div class="item-circle"><p>2021-01-21:更新页面左上角标题魔改</p></div></div><div class="timeline-item-content"><ol><li>文章左上角站点标题改为文章标题，悬停显示文章描述。</li><li>改动范围增大，设置默认描述内容。</li><li>页面也可以设置。</li></ol></div></div></div></div></details><h2 id="写在最前"><a href="#写在最前" class="headerlink" title="写在最前"></a>写在最前</h2><div class="tip cogs faa-horizontal animated"><p>本帖因为是持续更新，所以如无必要，不会特别提供静态资源。对于缩进要求严格的语法格式文件，读者务必遵照缩进指示进行操作。diff代码块仅做色块标记，删除+、-号之后记得补全空格，调整缩进。<br>本帖编写于<code>butterfly_v3.5.1</code>，低版本可能不完全适用，请自行斟酌。</p><div class="hide-block"><button type="button" class="hide-button">为什么说是微调</button><div class="hide-content"><p>鉴于我被读者吐槽说这么多内容哪里算微调了。所以这里有必要解释一下。之所以说是微调，是因为这里最多的内容是外挂js或者外挂css，真正针对源码的修改都在10行代码以内。而且外挂js或者css可以在source文件夹和inject配置项或CDN配置项统一快速管理。相比于其他的伤筋动骨的魔改大手术，这个微调合集的程度大概就是相当于割个双眼皮而已。</p></div></div></div><hr><h2 id="左上角站点标题"><a href="#左上角站点标题" class="headerlink" title="左上角站点标题"></a>左上角站点标题</h2><details class="folding-tag" red><summary>点击查看左上角标题魔改内容</summary><div class="content"><p></p><div class="note info morden flat"><p>改动页面的左上角显示内容。使得鼠标悬停左上角时显示描述。可以自己改描述的默认项。同时添加副标题属性。可以在<code>Front-matter</code>里使用<code>subtitle</code>定义副标题。如果副标题不存在，则显示主标题。</p></div><p></p><ol><li>改动<code>[Blogroot]\themes\butterfly\layout\includes\header\nav.pug</code>,当前的逻辑是文章内点击左上角标题是返回顶部。页面内点击左上角标题是返回首页。读者自己根据需要替换<code>href=url_for(&#39;/&#39;)</code>和<code>onclick=&#39;btf.scrollToDest(0, 500)&#39;</code>即可。但是不可以都放哦，虽然不会报错，但是既要跳转到页面顶部又要返回首页的，逻辑不合理。<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">  nav#nav</span><br><span class="line"><span class="deletion">-   span#blog_name</span></span><br><span class="line"><span class="deletion">-     a#site-name(href=url_for(&#x27;/&#x27;)) #[=config.title]</span></span><br><span class="line"><span class="addition">+   - var pagedescr = page.description ? page.description : &#x27;欢迎光临糖果屋，愿你有愉快的一天&#x27;</span></span><br><span class="line"><span class="addition">+   - var subtitle = page.subtitle ? page.subtitle : page.title</span></span><br><span class="line"><span class="addition">+   if is_post()</span></span><br><span class="line"><span class="addition">+     span#blog_name</span></span><br><span class="line"><span class="addition">+       a#site-name(onclick=&#x27;btf.scrollToDest(0, 500)&#x27; data-title=pagedescr) #[=subtitle]</span></span><br><span class="line"><span class="addition">+   else if is_page()</span></span><br><span class="line"><span class="addition">+     span#blog_name</span></span><br><span class="line"><span class="addition">+       a#site-name(href=url_for(&#x27;/&#x27;) data-title=pagedescr) #[=subtitle]</span></span><br><span class="line"><span class="addition">+   else</span></span><br><span class="line"><span class="addition">+     span#blog_name</span></span><br><span class="line"><span class="addition">+       a#site-name(href=url_for(&#x27;/&#x27;) data-title=pagedescr) #[=config.title]</span></span><br></pre></td></tr></table></figure></li><li>因为<code>hexo</code>自带缓存的关系，如果我们用的是缓存式引入的话，<code>nav</code>的刷新是惰性的，我们需要它根据文章和页面的切换实时变动。所以需要改动一下引入逻辑。修改<code>[Blogroot]\themes\butterfly\layout\includes\header\index.pug</code>，注意<code>butterfly_v3.6.0</code>取消了缓存配置，转为完全默认，需要将<code>{cache:theme.fragment_cache}</code>改为<code>{cache: true}</code>:<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">  header#page-header(class=isHomeClass style=bg_img)</span><br><span class="line"><span class="deletion">-   !=partial(&#x27;includes/header/nav&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span></span><br><span class="line"><span class="addition">+   include ./nav.pug</span></span><br><span class="line">    if top_img !== false</span><br><span class="line">      if is_post()</span><br><span class="line">        include ./post-info.pug</span><br></pre></td></tr></table></figure></li><li>目前的改动会导致左上角标题过长时挤占<code>menu-item</code>,为了不至于观感太差，需要设置自定义样式，设置标题超过长度自动隐藏。还要设置悬停时的提示框效果，自带title的提示框太丑了。新建<code>[Blogroot]\themes\butterfly\source\css\_layout\custom.styl</code>,<figure class="highlight stylus"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/*标题悬停显示文章描述*/</span></span><br><span class="line"><span class="selector-id">#site-name</span></span><br><span class="line">  <span class="selector-pseudo">&amp;:hover</span></span><br><span class="line">    <span class="selector-pseudo">&amp;:before</span></span><br><span class="line">      <span class="attribute">position</span>: fixed</span><br><span class="line">      <span class="attribute">width</span>:fit-content</span><br><span class="line">      <span class="attribute">margin</span>:auto</span><br><span class="line">      <span class="attribute">left</span>:<span class="number">0</span>;</span><br><span class="line">      <span class="attribute">right</span>:<span class="number">0</span></span><br><span class="line">      <span class="attribute">top</span>:<span class="number">10%</span></span><br><span class="line">      <span class="attribute">border-radius</span>: <span class="number">10px</span></span><br><span class="line">      <span class="attribute">text-align</span>: center</span><br><span class="line">      <span class="attribute">z-index</span>: <span class="number">100</span></span><br><span class="line">      <span class="attribute">content</span>: <span class="built_in">attr</span>(data-title)</span><br><span class="line">      <span class="attribute">font-size</span>: <span class="number">20px</span></span><br><span class="line">      <span class="attribute">color</span>: <span class="number">#fff</span></span><br><span class="line">      <span class="attribute">padding</span>: <span class="number">10px</span></span><br><span class="line">      <span class="attribute">background-color</span>: <span class="built_in">rgba</span>(<span class="variable">$theme</span>-color,<span class="number">0.9</span>)</span><br><span class="line"><span class="comment">/* 夜间模式适配 */</span></span><br><span class="line"><span class="selector-attr">[data-theme=dark]</span></span><br><span class="line">  a<span class="selector-id">#site-name</span></span><br><span class="line">    <span class="selector-pseudo">&amp;:hover</span></span><br><span class="line">      <span class="selector-pseudo">&amp;:before</span></span><br><span class="line">        <span class="attribute">background-color</span>: <span class="built_in">rgba</span>(<span class="number">#121212</span>,<span class="number">0.8</span>)</span><br><span class="line"><span class="comment">/* 定义最大宽度放置横幅霸屏 */</span></span><br><span class="line"><span class="keyword">@media</span> screen <span class="keyword">and</span> (<span class="attribute">min-width</span>: <span class="number">768px</span>)</span><br><span class="line">  a#site-name</span><br><span class="line">    &amp;:<span class="attribute">hover</span></span><br><span class="line">      &amp;:before</span><br><span class="line">        <span class="attribute">max-width</span> <span class="number">800px</span></span><br><span class="line">/*标题超过隐藏并显示省略号*/</span><br><span class="line">@media screen <span class="keyword">and</span> (<span class="attribute">max-width</span>: <span class="number">768px</span>)</span><br><span class="line">  a#site-name</span><br><span class="line">    -webkit-line-clamp <span class="number">1</span></span><br><span class="line">    word-break break-all</span><br><span class="line">    display -webkit-box</span><br><span class="line">    -webkit-box-orient vertical</span><br><span class="line">    overflow hidden</span><br></pre></td></tr></table></figure></li><li>新增副标题判断机制，可以在主标题下面设置副标题。如果副标题不存在，则右上角默认显示主标题。<figure class="highlight markdown"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line">title: 糖果屋微调合集</span><br><span class="line">subtitle: 持续更新ing...</span><br><span class="line"><span class="section">description: 将本站针对butterfly主题的亿点点小改动做个集锦。</span></span><br><span class="line"><span class="section">---</span></span><br></pre></td></tr></table></figure></li><li>极有可能出现的bug: 使用左上角标题魔改内容以后，有概率出现手机端切换页面时，手机端侧栏菜单变成PC端顶栏菜单。追加修复样式。修改<code>[Blogroot]\themes\butterfly\source\css\_layout\head.styl</code><figure class="highlight stylus"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">@media</span> screen <span class="keyword">and</span> (<span class="attribute">max-width</span>: <span class="number">768px</span>)</span><br><span class="line">  #nav</span><br><span class="line">    #toggle-menu</span><br><span class="line">      display: inline-block !important</span><br><span class="line"></span><br><span class="line">      .site-page</span><br><span class="line">        font-size: inherit</span><br><span class="line"></span><br><span class="line">    .menus_items</span><br><span class="line">      position: absolute</span><br><span class="line">      left: <span class="number">0</span></span><br><span class="line">      visibility: hidden</span><br><span class="line">      opacity: <span class="number">0</span></span><br><span class="line"></span><br><span class="line">    #search-button span</span><br><span class="line">      display: none !important</span><br></pre></td></tr></table></figure></li></ol></div></details><h2 id="打赏按钮投币彩蛋效果"><a href="#打赏按钮投币彩蛋效果" class="headerlink" title="打赏按钮投币彩蛋效果"></a>打赏按钮投币彩蛋效果</h2><div class="tabs" id="donate"><ul class="nav-tabs"><li class="tab"><button type="button" data-href="#donate-1">适用于butterfly_v3.3.0-3.5.1</button></li><li class="tab"><button type="button" data-href="#donate-2">适用于butterfly_v3.6.1-v3.7.1</button></li><li class="tab"><button type="button" data-href="#donate-3">适用于butterfly_v3.7.5+</button></li></ul><div class="tab-contents"><div class="tab-item-content" id="donate-1"><p></p><div class="note info morden flat"><p>改动文章页下方的打赏按钮，增加投币动画彩蛋。</p></div><p></p><ol><li>修改<code>[Blogroot]\themes\butterfly\layout\includes\post\reward.pug</code><figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br></pre></td><td class="code"><pre><span class="line"><span class="addition">+ link(rel=&#x27;stylesheet&#x27; href=url_for(theme.CDN.coin_css) media=&quot;defer&quot; onload=&quot;this.media=&#x27;all&#x27;&quot;)</span></span><br><span class="line">  .post-reward</span><br><span class="line"><span class="deletion">-   .reward-button</span></span><br><span class="line"><span class="deletion">-     i.fas.fa-qrcode</span></span><br><span class="line"><span class="deletion">-     = &#x27; &#x27; + _p(&#x27;donate&#x27;)</span></span><br><span class="line"><span class="addition">+   button.tip-button.reward-button</span></span><br><span class="line"><span class="addition">+     span.tip-button__text= _p(&#x27;donate&#x27;)</span></span><br><span class="line"><span class="addition">+     .coin-wrapper</span></span><br><span class="line"><span class="addition">+       .coin</span></span><br><span class="line"><span class="addition">+         .coin__middle</span></span><br><span class="line"><span class="addition">+         .coin__back</span></span><br><span class="line"><span class="addition">+         .coin__front</span></span><br><span class="line">      .reward-main</span><br><span class="line">        ul.reward-all</span><br><span class="line">          each item in theme.reward.QR_code</span><br><span class="line">            - var clickTo = (item.itemlist||item).link ? (item.itemlist||item).link : (item.itemlist||item).img</span><br><span class="line">            li.reward-item</span><br><span class="line">              a(href=clickTo target=&#x27;_blank&#x27;)</span><br><span class="line">                if theme.lazyload.enable</span><br><span class="line">                  img.post-qr-code-img(data-lazy-src=url_for((item.itemlist||item).img) alt=(item.itemlist||item).text)</span><br><span class="line">                else</span><br><span class="line">                  img.post-qr-code-img(src=url_for((item.itemlist||item).img) alt=(item.itemlist||item).text)</span><br><span class="line">              .post-qr-code-desc=(item.itemlist||item).text</span><br><span class="line"><span class="addition">+ if theme.reward.coinAudio</span></span><br><span class="line"><span class="addition">+   - var coinAudio = theme.reward.coinAudio ? url_for(theme.reward.coinAudio) : &#x27;https://npm.elemecdn.com/akilar-candyassets@1.0.16/audio/coin.mp3&#x27;</span></span><br><span class="line"><span class="addition">+   audio#coinAudio(src=coinAudio)</span></span><br><span class="line"><span class="addition">+ script(defer src=url_for(theme.CDN.coin_js))</span></span><br></pre></td></tr></table></figure></li><li>新建<code>[Blogroot]\themes\butterfly\source\css\coin.css</code><figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-class">.tip-button</span> &#123;</span><br><span class="line">  <span class="attribute">border</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">border-radius</span>: <span class="number">0.25rem</span>;</span><br><span class="line">  <span class="attribute">cursor</span>: pointer;</span><br><span class="line">  <span class="attribute">font-size</span>: <span class="number">20px</span>;</span><br><span class="line">  <span class="attribute">font-weight</span>: <span class="number">600</span>;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">2.6rem</span>;</span><br><span class="line">  <span class="attribute">margin-bottom</span>: -<span class="number">4rem</span>;</span><br><span class="line">  <span class="attribute">outline</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">position</span>: relative;</span><br><span class="line">  <span class="attribute">top</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">transform-origin</span>: <span class="number">0%</span> <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">transition</span>: transform <span class="number">50ms</span> ease-in-out;</span><br><span class="line">  <span class="attribute">width</span>: auto;</span><br><span class="line">  -webkit-tap-highlight-<span class="attribute">color</span>: transparent;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-pseudo">:active</span> &#123;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">rotate</span>(<span class="number">4deg</span>);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-class">.clicked</span> &#123;</span><br><span class="line">  <span class="attribute">animation</span>: <span class="number">150ms</span> ease-in-out <span class="number">1</span> shake;</span><br><span class="line">  <span class="attribute">pointer-events</span>: none;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-class">.clicked</span> <span class="selector-class">.tip-button__text</span> &#123;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">transition</span>: opacity <span class="number">100ms</span> linear <span class="number">200ms</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-class">.clicked</span><span class="selector-pseudo">::before</span> &#123;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">0.5rem</span>;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">60%</span>;</span><br><span class="line">  <span class="attribute">background</span>: $button-hover-color;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-class">.clicked</span> <span class="selector-class">.coin</span> &#123;</span><br><span class="line">  <span class="attribute">transition</span>: margin-bottom <span class="number">1s</span> linear <span class="number">200ms</span>;</span><br><span class="line">  <span class="attribute">margin-bottom</span>: <span class="number">0</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-class">.shrink-landing</span><span class="selector-pseudo">::before</span> &#123;</span><br><span class="line">  <span class="attribute">transition</span>: width <span class="number">200ms</span> ease-in;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">0</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-class">.coin-landed</span><span class="selector-pseudo">::after</span> &#123;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="number">1</span>;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">  <span class="attribute">transform-origin</span>: <span class="number">50%</span> <span class="number">100%</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-class">.coin-landed</span> <span class="selector-class">.coin-wrapper</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">radial-gradient</span>(circle at <span class="number">35%</span> <span class="number">97%</span>, <span class="built_in">rgba</span>(<span class="number">3</span>, <span class="number">16</span>, <span class="number">50</span>, <span class="number">0.4</span>) <span class="number">0.04rem</span>, transparent <span class="number">0.04rem</span>), <span class="built_in">radial-gradient</span>(circle at <span class="number">45%</span> <span class="number">92%</span>, <span class="built_in">rgba</span>(<span class="number">3</span>, <span class="number">16</span>, <span class="number">50</span>, <span class="number">0.4</span>) <span class="number">0.04rem</span>, transparent <span class="number">0.02rem</span>), <span class="built_in">radial-gradient</span>(circle at <span class="number">55%</span> <span class="number">98%</span>, <span class="built_in">rgba</span>(<span class="number">3</span>, <span class="number">16</span>, <span class="number">50</span>, <span class="number">0.4</span>) <span class="number">0.04rem</span>, transparent <span class="number">0.04rem</span>), <span class="built_in">radial-gradient</span>(circle at <span class="number">65%</span> <span class="number">96%</span>, <span class="built_in">rgba</span>(<span class="number">3</span>, <span class="number">16</span>, <span class="number">50</span>, <span class="number">0.4</span>) <span class="number">0.06rem</span>, transparent <span class="number">0.06rem</span>);</span><br><span class="line">  <span class="attribute">background-position</span>: center bottom;</span><br><span class="line">  <span class="attribute">background-size</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">bottom</span>: -<span class="number">1rem</span>;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">scale</span>(<span class="number">2</span>) <span class="built_in">translateY</span>(-<span class="number">10px</span>);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button__text</span> &#123;</span><br><span class="line">  <span class="attribute">color</span>: <span class="number">#fff</span>;</span><br><span class="line">  <span class="attribute">margin-right</span>: <span class="number">1.8rem</span>;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="number">1</span>;</span><br><span class="line">  <span class="attribute">position</span>: relative;</span><br><span class="line">  <span class="attribute">transition</span>: opacity <span class="number">100ms</span> linear <span class="number">500ms</span>;</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">3</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-pseudo">::before</span> &#123;</span><br><span class="line">  <span class="attribute">border-radius</span>: <span class="number">0.25rem</span>;</span><br><span class="line">  <span class="attribute">bottom</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">content</span>: <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">  <span class="attribute">display</span>: block;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">left</span>: <span class="number">50%</span>;</span><br><span class="line">  <span class="attribute">position</span>: absolute;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateX</span>(-<span class="number">50%</span>);</span><br><span class="line">  <span class="attribute">transition</span>: height <span class="number">250ms</span> ease-in-out <span class="number">400ms</span>, width <span class="number">250ms</span> ease-in-out <span class="number">300ms</span>;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">2</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-pseudo">::after</span> &#123;</span><br><span class="line">  <span class="attribute">bottom</span>: -<span class="number">1rem</span>;</span><br><span class="line">  <span class="attribute">color</span>: white;</span><br><span class="line">  <span class="attribute">content</span>: <span class="string">&#x27;ヾ(≧O≦)〃嗷~&#x27;</span>; <span class="comment">/*点击后显示的内容*/</span></span><br><span class="line">  <span class="attribute">height</span>: <span class="number">110%</span>;</span><br><span class="line">  <span class="attribute">left</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">position</span>: absolute;</span><br><span class="line">  <span class="attribute">pointer-events</span>: none;</span><br><span class="line">  <span class="attribute">text-align</span>: center;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">scale</span>(<span class="number">0</span>);</span><br><span class="line">  <span class="attribute">transform-origin</span>: <span class="number">50%</span> <span class="number">20%</span>;</span><br><span class="line">  <span class="attribute">transition</span>: transform <span class="number">200ms</span> <span class="built_in">cubic-bezier</span>(<span class="number">0</span>, <span class="number">0</span>, <span class="number">0.35</span>, <span class="number">1.43</span>);</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">1</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.coin-wrapper</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: none;</span><br><span class="line">  <span class="attribute">bottom</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">18rem</span>;</span><br><span class="line">  <span class="attribute">left</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="number">1</span>;</span><br><span class="line">  <span class="attribute">overflow</span>: hidden;</span><br><span class="line">  <span class="attribute">pointer-events</span>: none;</span><br><span class="line">  <span class="attribute">position</span>: absolute;</span><br><span class="line">  <span class="attribute">transform</span>: none;</span><br><span class="line">  <span class="attribute">transform-origin</span>: <span class="number">50%</span> <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">transition</span>: opacity <span class="number">200ms</span> linear <span class="number">100ms</span>, transform <span class="number">300ms</span> ease-out;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.coin</span> &#123;</span><br><span class="line">  <span class="attr">--front-y-multiplier</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attr">--back-y-multiplier</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attr">--coin-y-multiplier</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attr">--coin-x-multiplier</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attr">--coin-scale-multiplier</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attr">--coin-rotation-multiplier</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attr">--shine-opacity-multiplier</span>: <span class="number">0.4</span>;</span><br><span class="line">  <span class="attr">--shine-bg-multiplier</span>: <span class="number">50%</span>;</span><br><span class="line">  <span class="attribute">bottom</span>: <span class="built_in">calc</span>(<span class="built_in">var</span>(--coin-y-multiplier) * <span class="number">1rem</span> - <span class="number">3.5rem</span>);</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">3.5rem</span>;</span><br><span class="line">  <span class="attribute">margin-bottom</span>: <span class="number">3.05rem</span>;</span><br><span class="line">  <span class="attribute">position</span>: absolute;</span><br><span class="line">  <span class="attribute">right</span>: <span class="built_in">calc</span>(<span class="built_in">var</span>(--coin-x-multiplier) * <span class="number">34%</span> + <span class="number">16%</span>);</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateX</span>(<span class="number">50%</span>) <span class="built_in">scale</span>(<span class="built_in">calc</span>(<span class="number">0.4</span> + <span class="built_in">var</span>(--coin-scale-multiplier))) <span class="built_in">rotate</span>(<span class="built_in">calc</span>(<span class="built_in">var</span>(--coin-rotation-multiplier) * -<span class="number">1deg</span>));</span><br><span class="line">  <span class="attribute">transition</span>: opacity <span class="number">100ms</span> linear <span class="number">200ms</span>;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">3.5rem</span>;</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">3</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.coin__front</span>, <span class="selector-class">.coin__middle</span>, <span class="selector-class">.coin__back</span>, <span class="selector-class">.coin</span><span class="selector-pseudo">::before</span>, <span class="selector-class">.coin__front</span><span class="selector-pseudo">::after</span>, <span class="selector-class">.coin__back</span><span class="selector-pseudo">::after</span> &#123;</span><br><span class="line">  <span class="attribute">border-radius</span>: <span class="number">50%</span>;</span><br><span class="line">  <span class="attribute">box-sizing</span>: border-box;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">left</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">position</span>: absolute;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">3</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.coin__front</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">radial-gradient</span>(circle at <span class="number">50%</span> <span class="number">50%</span>, transparent <span class="number">50%</span>, <span class="built_in">rgba</span>(<span class="number">115</span>, <span class="number">124</span>, <span class="number">153</span>, <span class="number">0.4</span>) <span class="number">54%</span>, <span class="number">#c2cadf</span> <span class="number">54%</span>), <span class="built_in">linear-gradient</span>(<span class="number">210deg</span>, <span class="number">#8590b3</span> <span class="number">32%</span>, transparent <span class="number">32%</span>), <span class="built_in">linear-gradient</span>(<span class="number">150deg</span>, <span class="number">#8590b3</span> <span class="number">32%</span>, transparent <span class="number">32%</span>), <span class="built_in">linear-gradient</span>(to right, <span class="number">#8590b3</span> <span class="number">22%</span>, transparent <span class="number">22%</span>, transparent <span class="number">78%</span>, <span class="number">#8590b3</span> <span class="number">78%</span>), <span class="built_in">linear-gradient</span>(to bottom, <span class="number">#fcfaf9</span> <span class="number">44%</span>, transparent <span class="number">44%</span>, transparent <span class="number">65%</span>, <span class="number">#fcfaf9</span> <span class="number">65%</span>, <span class="number">#fcfaf9</span> <span class="number">71%</span>, <span class="number">#8590b3</span> <span class="number">71%</span>), <span class="built_in">linear-gradient</span>(to right, transparent <span class="number">28%</span>, <span class="number">#fcfaf9</span> <span class="number">28%</span>, <span class="number">#fcfaf9</span> <span class="number">34%</span>, <span class="number">#8590b3</span> <span class="number">34%</span>, <span class="number">#8590b3</span> <span class="number">40%</span>, <span class="number">#fcfaf9</span> <span class="number">40%</span>, <span class="number">#fcfaf9</span> <span class="number">47%</span>, <span class="number">#8590b3</span> <span class="number">47%</span>, <span class="number">#8590b3</span> <span class="number">53%</span>, <span class="number">#fcfaf9</span> <span class="number">53%</span>, <span class="number">#fcfaf9</span> <span class="number">60%</span>, <span class="number">#8590b3</span> <span class="number">60%</span>, <span class="number">#8590b3</span> <span class="number">66%</span>, <span class="number">#fcfaf9</span> <span class="number">66%</span>, <span class="number">#fcfaf9</span> <span class="number">72%</span>, transparent <span class="number">72%</span>);</span><br><span class="line">  <span class="attribute">background-color</span>: <span class="number">#8590b3</span>;</span><br><span class="line">  <span class="attribute">background-size</span>: <span class="number">100%</span> <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateY</span>(<span class="built_in">calc</span>(<span class="built_in">var</span>(--front-y-multiplier) * <span class="number">0.3181818182rem</span> / <span class="number">2</span>)) <span class="built_in">scaleY</span>(<span class="built_in">var</span>(--front-scale-multiplier));</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.coin__front</span><span class="selector-pseudo">::after</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">rgba</span>(<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0.2</span>);</span><br><span class="line">  <span class="attribute">content</span>: <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="built_in">var</span>(--front-y-multiplier);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.coin__middle</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="number">#737c99</span>;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateY</span>(<span class="built_in">calc</span>(<span class="built_in">var</span>(--middle-y-multiplier) * <span class="number">0.3181818182rem</span> / <span class="number">2</span>)) <span class="built_in">scaleY</span>(<span class="built_in">var</span>(--middle-scale-multiplier));</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.coin__back</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">radial-gradient</span>(circle at <span class="number">50%</span> <span class="number">50%</span>, transparent <span class="number">50%</span>, <span class="built_in">rgba</span>(<span class="number">115</span>, <span class="number">124</span>, <span class="number">153</span>, <span class="number">0.4</span>) <span class="number">54%</span>, <span class="number">#c2cadf</span> <span class="number">54%</span>), <span class="built_in">radial-gradient</span>(circle at <span class="number">50%</span> <span class="number">40%</span>, <span class="number">#fcfaf9</span> <span class="number">23%</span>, transparent <span class="number">23%</span>), <span class="built_in">radial-gradient</span>(circle at <span class="number">50%</span> <span class="number">100%</span>, <span class="number">#fcfaf9</span> <span class="number">35%</span>, transparent <span class="number">35%</span>);</span><br><span class="line">  <span class="attribute">background-color</span>: <span class="number">#8590b3</span>;</span><br><span class="line">  <span class="attribute">background-size</span>: <span class="number">100%</span> <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateY</span>(<span class="built_in">calc</span>(<span class="built_in">var</span>(--back-y-multiplier) * <span class="number">0.3181818182rem</span> / <span class="number">2</span>)) <span class="built_in">scaleY</span>(<span class="built_in">var</span>(--back-scale-multiplier));</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.coin__back</span><span class="selector-pseudo">::after</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">rgba</span>(<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0.2</span>);</span><br><span class="line">  <span class="attribute">content</span>: <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="built_in">var</span>(--back-y-multiplier);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.coin</span><span class="selector-pseudo">::before</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">radial-gradient</span>(circle at <span class="number">25%</span> <span class="number">65%</span>, transparent <span class="number">50%</span>, <span class="built_in">rgba</span>(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">0.9</span>) <span class="number">90%</span>), <span class="built_in">linear-gradient</span>(<span class="number">55deg</span>, transparent <span class="built_in">calc</span>(<span class="built_in">var</span>(--shine-bg-multiplier) + <span class="number">0%</span>), <span class="number">#e9f4ff</span> <span class="built_in">calc</span>(<span class="built_in">var</span>(--shine-bg-multiplier) + <span class="number">0%</span>), transparent <span class="built_in">calc</span>(<span class="built_in">var</span>(--shine-bg-multiplier) + <span class="number">50%</span>));</span><br><span class="line">  <span class="attribute">content</span>: <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="built_in">var</span>(--shine-opacity-multiplier);</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateY</span>(<span class="built_in">calc</span>(<span class="built_in">var</span>(--middle-y-multiplier) * <span class="number">0.3181818182rem</span> / -<span class="number">2</span>)) <span class="built_in">scaleY</span>(<span class="built_in">var</span>(--middle-scale-multiplier)) <span class="built_in">rotate</span>(<span class="built_in">calc</span>(<span class="built_in">var</span>(--coin-rotation-multiplier) * <span class="number">1deg</span>));</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">10</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.coin</span><span class="selector-pseudo">::after</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="number">#737c99</span>;</span><br><span class="line">  <span class="attribute">content</span>: <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">0.3181818182rem</span>;</span><br><span class="line">  <span class="attribute">left</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">position</span>: absolute;</span><br><span class="line">  <span class="attribute">top</span>: <span class="number">50%</span>;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateY</span>(-<span class="number">50%</span>);</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">2</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">@keyframes</span> shake &#123;</span><br><span class="line">  <span class="number">0%</span> &#123;</span><br><span class="line">    <span class="attribute">transform</span>: <span class="built_in">rotate</span>(<span class="number">4deg</span>);</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="number">66%</span> &#123;</span><br><span class="line">    <span class="attribute">transform</span>: <span class="built_in">rotate</span>(-<span class="number">4deg</span>);</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="number">100%</span> &#123;</span><br><span class="line">    <span class="attribute">transform</span>: <span class="built_in">rotate</span>();</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></li><li>新建<code>[Blogroot]\themes\butterfly\source\js\coin.js</code><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> tipButtons = <span class="variable language_">document</span>.<span class="title function_">querySelectorAll</span>(<span class="string">&#x27;.tip-button&#x27;</span>)</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">coinAudio</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> coinAudio = <span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&quot;coinAudio&quot;</span>);</span><br><span class="line">  <span class="keyword">if</span> (coinAudio) &#123;</span><br><span class="line">    coinAudio.<span class="title function_">play</span>();<span class="comment">//有音频时播放</span></span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="comment">// Loop through all buttons (allows for multiple buttons on page)</span></span><br><span class="line">tipButtons.<span class="title function_">forEach</span>(<span class="function">(<span class="params">button</span>) =&gt;</span> &#123;</span><br><span class="line">  <span class="keyword">var</span> coin = button.<span class="title function_">querySelector</span>(<span class="string">&#x27;.coin&#x27;</span>)</span><br><span class="line"></span><br><span class="line">  <span class="comment">// The larger the number, the slower the animation</span></span><br><span class="line">  coin.<span class="property">maxMoveLoopCount</span> = <span class="number">90</span></span><br><span class="line"></span><br><span class="line">  button.<span class="title function_">addEventListener</span>(<span class="string">&#x27;click&#x27;</span>, <span class="function">() =&gt;</span> &#123;</span><br><span class="line">    <span class="keyword">if</span> (<span class="regexp">/Android|webOS|BlackBerry/i</span>.<span class="title function_">test</span>(navigator.<span class="property">userAgent</span>)) <span class="keyword">return</span> <span class="literal">true</span>; <span class="comment">//媒体选择</span></span><br><span class="line">    <span class="keyword">if</span> (button.<span class="property">clicked</span>) <span class="keyword">return</span></span><br><span class="line">    button.<span class="property">classList</span>.<span class="title function_">add</span>(<span class="string">&#x27;clicked&#x27;</span>)</span><br><span class="line"></span><br><span class="line">    <span class="comment">// Wait to start flipping th coin because of the button tilt animation</span></span><br><span class="line">    <span class="built_in">setTimeout</span>(<span class="function">() =&gt;</span> &#123;</span><br><span class="line">      <span class="comment">// Randomize the flipping speeds just for fun</span></span><br><span class="line">      coin.<span class="property">sideRotationCount</span> = <span class="title class_">Math</span>.<span class="title function_">floor</span>(<span class="title class_">Math</span>.<span class="title function_">random</span>() * <span class="number">5</span>) * <span class="number">90</span></span><br><span class="line">      coin.<span class="property">maxFlipAngle</span> = (<span class="title class_">Math</span>.<span class="title function_">floor</span>(<span class="title class_">Math</span>.<span class="title function_">random</span>() * <span class="number">4</span>) + <span class="number">3</span>) * <span class="title class_">Math</span>.<span class="property">PI</span></span><br><span class="line">      button.<span class="property">clicked</span> = <span class="literal">true</span></span><br><span class="line">      <span class="title function_">flipCoin</span>()</span><br><span class="line">      <span class="title function_">coinAudio</span>()</span><br><span class="line">    &#125;, <span class="number">50</span>)</span><br><span class="line">  &#125;)</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> <span class="title function_">flipCoin</span> = (<span class="params"></span>) =&gt; &#123;</span><br><span class="line">    coin.<span class="property">moveLoopCount</span> = <span class="number">0</span></span><br><span class="line">    <span class="title function_">flipCoinLoop</span>()</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> <span class="title function_">resetCoin</span> = (<span class="params"></span>) =&gt; &#123;</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--coin-x-multiplier&#x27;</span>, <span class="number">0</span>)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--coin-scale-multiplier&#x27;</span>, <span class="number">0</span>)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--coin-rotation-multiplier&#x27;</span>, <span class="number">0</span>)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--shine-opacity-multiplier&#x27;</span>, <span class="number">0.4</span>)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--shine-bg-multiplier&#x27;</span>, <span class="string">&#x27;50%&#x27;</span>)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;opacity&#x27;</span>, <span class="number">1</span>)</span><br><span class="line">    <span class="comment">// Delay to give the reset animation some time before you can click again</span></span><br><span class="line">    <span class="built_in">setTimeout</span>(<span class="function">() =&gt;</span> &#123;</span><br><span class="line">      button.<span class="property">clicked</span> = <span class="literal">false</span></span><br><span class="line">    &#125;, <span class="number">300</span>)</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> <span class="title function_">flipCoinLoop</span> = (<span class="params"></span>) =&gt; &#123;</span><br><span class="line">    coin.<span class="property">moveLoopCount</span>++</span><br><span class="line">    <span class="keyword">var</span> percentageCompleted = coin.<span class="property">moveLoopCount</span> / coin.<span class="property">maxMoveLoopCount</span></span><br><span class="line">    coin.<span class="property">angle</span> = -coin.<span class="property">maxFlipAngle</span> * <span class="title class_">Math</span>.<span class="title function_">pow</span>((percentageCompleted - <span class="number">1</span>), <span class="number">2</span>) + coin.<span class="property">maxFlipAngle</span></span><br><span class="line"></span><br><span class="line">    <span class="comment">// Calculate the scale and position of the coin moving through the air</span></span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--coin-y-multiplier&#x27;</span>, -<span class="number">11</span> * <span class="title class_">Math</span>.<span class="title function_">pow</span>(percentageCompleted * <span class="number">2</span> - <span class="number">1</span>, <span class="number">4</span>) + <span class="number">11</span>)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--coin-x-multiplier&#x27;</span>, percentageCompleted)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--coin-scale-multiplier&#x27;</span>, percentageCompleted * <span class="number">0.6</span>)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--coin-rotation-multiplier&#x27;</span>, percentageCompleted * coin.<span class="property">sideRotationCount</span>)</span><br><span class="line"></span><br><span class="line">    <span class="comment">// Calculate the scale and position values for the different coin faces</span></span><br><span class="line">    <span class="comment">// The math uses sin/cos wave functions to similate the circular motion of 3D spin</span></span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--front-scale-multiplier&#x27;</span>, <span class="title class_">Math</span>.<span class="title function_">max</span>(<span class="title class_">Math</span>.<span class="title function_">cos</span>(coin.<span class="property">angle</span>), <span class="number">0</span>))</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--front-y-multiplier&#x27;</span>, <span class="title class_">Math</span>.<span class="title function_">sin</span>(coin.<span class="property">angle</span>))</span><br><span class="line"></span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--middle-scale-multiplier&#x27;</span>, <span class="title class_">Math</span>.<span class="title function_">abs</span>(<span class="title class_">Math</span>.<span class="title function_">cos</span>(coin.<span class="property">angle</span>), <span class="number">0</span>))</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--middle-y-multiplier&#x27;</span>, <span class="title class_">Math</span>.<span class="title function_">cos</span>((coin.<span class="property">angle</span> + <span class="title class_">Math</span>.<span class="property">PI</span> / <span class="number">2</span>) % <span class="title class_">Math</span>.<span class="property">PI</span>))</span><br><span class="line"></span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--back-scale-multiplier&#x27;</span>, <span class="title class_">Math</span>.<span class="title function_">max</span>(<span class="title class_">Math</span>.<span class="title function_">cos</span>(coin.<span class="property">angle</span> - <span class="title class_">Math</span>.<span class="property">PI</span>), <span class="number">0</span>))</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--back-y-multiplier&#x27;</span>, <span class="title class_">Math</span>.<span class="title function_">sin</span>(coin.<span class="property">angle</span> - <span class="title class_">Math</span>.<span class="property">PI</span>))</span><br><span class="line"></span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--shine-opacity-multiplier&#x27;</span>, <span class="number">4</span> * <span class="title class_">Math</span>.<span class="title function_">sin</span>((coin.<span class="property">angle</span> + <span class="title class_">Math</span>.<span class="property">PI</span> / <span class="number">2</span>) % <span class="title class_">Math</span>.<span class="property">PI</span>) - <span class="number">3.2</span>)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--shine-bg-multiplier&#x27;</span>, -<span class="number">40</span> * (<span class="title class_">Math</span>.<span class="title function_">cos</span>((coin.<span class="property">angle</span> + <span class="title class_">Math</span>.<span class="property">PI</span> / <span class="number">2</span>) % <span class="title class_">Math</span>.<span class="property">PI</span>) - <span class="number">0.5</span>) + <span class="string">&#x27;%&#x27;</span>)</span><br><span class="line"></span><br><span class="line">    <span class="comment">// Repeat animation loop</span></span><br><span class="line">    <span class="keyword">if</span> (coin.<span class="property">moveLoopCount</span> &lt; coin.<span class="property">maxMoveLoopCount</span>) &#123;</span><br><span class="line">      <span class="keyword">if</span> (coin.<span class="property">moveLoopCount</span> === coin.<span class="property">maxMoveLoopCount</span> - <span class="number">6</span>) button.<span class="property">classList</span>.<span class="title function_">add</span>(<span class="string">&#x27;shrink-landing&#x27;</span>)</span><br><span class="line">      <span class="variable language_">window</span>.<span class="title function_">requestAnimationFrame</span>(flipCoinLoop)</span><br><span class="line">    &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">      button.<span class="property">classList</span>.<span class="title function_">add</span>(<span class="string">&#x27;coin-landed&#x27;</span>)</span><br><span class="line">      coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;opacity&#x27;</span>, <span class="number">0</span>)</span><br><span class="line">      <span class="built_in">setTimeout</span>(<span class="function">() =&gt;</span> &#123;</span><br><span class="line">        button.<span class="property">classList</span>.<span class="title function_">remove</span>(<span class="string">&#x27;clicked&#x27;</span>, <span class="string">&#x27;shrink-landing&#x27;</span>, <span class="string">&#x27;coin-landed&#x27;</span>)</span><br><span class="line">        <span class="built_in">setTimeout</span>(<span class="function">() =&gt;</span> &#123;</span><br><span class="line">          <span class="title function_">resetCoin</span>()</span><br><span class="line">        &#125;, <span class="number">300</span>)</span><br><span class="line">      &#125;, <span class="number">1500</span>)</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;)</span><br></pre></td></tr></table></figure></li><li>修改<code>_config.butterfly.yml</code>,添加音频文件配置项，添加CDN配置项：<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">  # Sponsor/reward</span><br><span class="line">  reward:</span><br><span class="line">    enable: true</span><br><span class="line"><span class="addition">+   coinAudio: https://npm.elemecdn.com/akilar-candyassets@1.0.16/audio/coin.mp3</span></span><br><span class="line">    QR_code:</span><br><span class="line">    。</span><br><span class="line">    。</span><br><span class="line">    。</span><br><span class="line">  CDN:</span><br><span class="line">    # main</span><br><span class="line">    main_css: /css/index.css</span><br><span class="line">    jquery: https://npm.elemecdn.com/jquery@latest/dist/jquery.min.js</span><br><span class="line">    main: /js/main.js</span><br><span class="line">    utils:/js/utils.js</span><br><span class="line"><span class="addition">+    # 打赏按钮投币效果</span></span><br><span class="line"><span class="addition">+   coin_js: /js/coin.js</span></span><br><span class="line"><span class="addition">+   coin_css: /css/coin.css</span></span><br></pre></td></tr></table></figure></li><li>现在的打赏按钮样式需要稍作适配，当前若提示语太长，悬停时会无法显示完全。需要微调一下,修改<code>[Blogroot]\themes\butterfly\source\css\_layout\reward.styl</code>：<ul><li>修改悬停打赏按钮时的颜色填充长度：<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">  .reward-button</span><br><span class="line">    display: inline-block</span><br><span class="line">    padding: .2rem 1.2rem</span><br><span class="line">    background: var(--btn-bg)</span><br><span class="line">    color: var(--btn-color)</span><br><span class="line">    cursor: pointer</span><br><span class="line">    transition: all .4s</span><br><span class="line"></span><br><span class="line">    &amp;:hover</span><br><span class="line"><span class="deletion">-     box-shadow: inset 9em 0 0 0 var(--btn-hover-color)</span></span><br><span class="line"><span class="addition">+     box-shadow: inset 20em 0 0 0 var(--btn-hover-color)</span></span><br></pre></td></tr></table></figure></li><li>修改打赏二维码的样式（仅针对2张二维码的情况，单张不用改动。两张以上需要自己调试这两个参数）<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">  .reward-main</span><br><span class="line">    position: absolute</span><br><span class="line">    bottom: 40px</span><br><span class="line"><span class="deletion">-   left: 0</span></span><br><span class="line"><span class="addition">+   left: -25%</span></span><br><span class="line">    z-index: 100</span><br><span class="line">    display: none</span><br><span class="line">    padding: 0 0 15px</span><br><span class="line"><span class="deletion">-   width: 100%</span></span><br><span class="line"><span class="addition">+   width: 150%</span></span><br></pre></td></tr></table></figure></li></ul></li></ol><button type="button" class="tab-to-top" aria-label="scroll to top"><i class="fas fa-arrow-up"></i></button></div><div class="tab-item-content" id="donate-2"><p></p><div class="note info morden flat"><p>改动文章页下方的打赏按钮，增加投币动画彩蛋。v3.6.0重写了reward.pug,适配起来有动画偏移兼容问题。考虑到这部分是嵌入式样式，所以大可以直接把reward相关内容局部回退至3.5.1。</p></div><p></p><ol><li>修改<code>[Blogroot]\themes\butterfly\layout\includes\post\reward.pug</code>,整体替换为以下内容：<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><span class="line">link(rel=<span class="string">&#x27;stylesheet&#x27;</span> href=url_for(theme.CDN.coin_css) media=<span class="string">&quot;defer&quot;</span> onload=<span class="string">&quot;this.media=&#x27;all&#x27;&quot;</span>)</span><br><span class="line">.post-reward</span><br><span class="line">  button.tip-button.reward-button</span><br><span class="line">    span.tip-button__text= _p(<span class="string">&#x27;donate&#x27;</span>)</span><br><span class="line">    .coin-wrapper</span><br><span class="line">      .coin</span><br><span class="line">        .coin__middle</span><br><span class="line">        .coin__back</span><br><span class="line">        .coin__front</span><br><span class="line">    .reward-main</span><br><span class="line">      ul.reward-<span class="built_in">all</span></span><br><span class="line">        each item <span class="keyword">in</span> theme.reward.QR_code</span><br><span class="line">          - var clickTo = (item.itemlist||item).link ? (item.itemlist||item).link : (item.itemlist||item).img</span><br><span class="line">          li.reward-item</span><br><span class="line">            a(href=clickTo target=<span class="string">&#x27;_blank&#x27;</span>)</span><br><span class="line">              <span class="keyword">if</span> theme.lazyload.enable</span><br><span class="line">                img.post-qr-code-img(data-lazy-src=url_for((item.itemlist||item).img) alt=(item.itemlist||item).text)</span><br><span class="line">              <span class="keyword">else</span></span><br><span class="line">                img.post-qr-code-img(src=url_for((item.itemlist||item).img) alt=(item.itemlist||item).text)</span><br><span class="line">            .post-qr-code-desc=(item.itemlist||item).text</span><br><span class="line"><span class="keyword">if</span> theme.reward.coinAudio</span><br><span class="line">  - var coinAudio = theme.reward.coinAudio ? url_for(theme.reward.coinAudio) : <span class="string">&#x27;https://npm.elemecdn.com/akilar-candyassets@1.0.16/audio/coin.mp3&#x27;</span></span><br><span class="line">  audio<span class="comment">#coinAudio(src=coinAudio)</span></span><br><span class="line">script(defer src=url_for(theme.CDN.coin_js))</span><br></pre></td></tr></table></figure></li><li>新建<code>[Blogroot]\themes\butterfly\source\css\coin.css</code><figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-class">.tip-button</span> &#123;</span><br><span class="line">  <span class="attribute">border</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">border-radius</span>: <span class="number">0.25rem</span>;</span><br><span class="line">  <span class="attribute">cursor</span>: pointer;</span><br><span class="line">  <span class="attribute">font-size</span>: <span class="number">20px</span>;</span><br><span class="line">  <span class="attribute">font-weight</span>: <span class="number">600</span>;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">2.6rem</span>;</span><br><span class="line">  <span class="attribute">margin-bottom</span>: -<span class="number">4rem</span>;</span><br><span class="line">  <span class="attribute">outline</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">position</span>: relative;</span><br><span class="line">  <span class="attribute">top</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">transform-origin</span>: <span class="number">0%</span> <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">transition</span>: transform <span class="number">50ms</span> ease-in-out;</span><br><span class="line">  <span class="attribute">width</span>: auto;</span><br><span class="line">  -webkit-tap-highlight-<span class="attribute">color</span>: transparent;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-pseudo">:active</span> &#123;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">rotate</span>(<span class="number">4deg</span>);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-class">.clicked</span> &#123;</span><br><span class="line">  <span class="attribute">animation</span>: <span class="number">150ms</span> ease-in-out <span class="number">1</span> shake;</span><br><span class="line">  <span class="attribute">pointer-events</span>: none;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-class">.clicked</span> <span class="selector-class">.tip-button__text</span> &#123;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">transition</span>: opacity <span class="number">100ms</span> linear <span class="number">200ms</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-class">.clicked</span><span class="selector-pseudo">::before</span> &#123;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">0.5rem</span>;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">60%</span>;</span><br><span class="line">  <span class="attribute">background</span>: $button-hover-color;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-class">.clicked</span> <span class="selector-class">.coin</span> &#123;</span><br><span class="line">  <span class="attribute">transition</span>: margin-bottom <span class="number">1s</span> linear <span class="number">200ms</span>;</span><br><span class="line">  <span class="attribute">margin-bottom</span>: <span class="number">0</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-class">.shrink-landing</span><span class="selector-pseudo">::before</span> &#123;</span><br><span class="line">  <span class="attribute">transition</span>: width <span class="number">200ms</span> ease-in;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">0</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-class">.coin-landed</span><span class="selector-pseudo">::after</span> &#123;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="number">1</span>;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">  <span class="attribute">transform-origin</span>: <span class="number">50%</span> <span class="number">100%</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-class">.coin-landed</span> <span class="selector-class">.coin-wrapper</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">radial-gradient</span>(circle at <span class="number">35%</span> <span class="number">97%</span>, <span class="built_in">rgba</span>(<span class="number">3</span>, <span class="number">16</span>, <span class="number">50</span>, <span class="number">0.4</span>) <span class="number">0.04rem</span>, transparent <span class="number">0.04rem</span>), <span class="built_in">radial-gradient</span>(circle at <span class="number">45%</span> <span class="number">92%</span>, <span class="built_in">rgba</span>(<span class="number">3</span>, <span class="number">16</span>, <span class="number">50</span>, <span class="number">0.4</span>) <span class="number">0.04rem</span>, transparent <span class="number">0.02rem</span>), <span class="built_in">radial-gradient</span>(circle at <span class="number">55%</span> <span class="number">98%</span>, <span class="built_in">rgba</span>(<span class="number">3</span>, <span class="number">16</span>, <span class="number">50</span>, <span class="number">0.4</span>) <span class="number">0.04rem</span>, transparent <span class="number">0.04rem</span>), <span class="built_in">radial-gradient</span>(circle at <span class="number">65%</span> <span class="number">96%</span>, <span class="built_in">rgba</span>(<span class="number">3</span>, <span class="number">16</span>, <span class="number">50</span>, <span class="number">0.4</span>) <span class="number">0.06rem</span>, transparent <span class="number">0.06rem</span>);</span><br><span class="line">  <span class="attribute">background-position</span>: center bottom;</span><br><span class="line">  <span class="attribute">background-size</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">bottom</span>: -<span class="number">1rem</span>;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">scale</span>(<span class="number">2</span>) <span class="built_in">translateY</span>(-<span class="number">10px</span>);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button__text</span> &#123;</span><br><span class="line">  <span class="attribute">color</span>: <span class="number">#fff</span>;</span><br><span class="line">  <span class="attribute">margin-right</span>: <span class="number">1.8rem</span>;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="number">1</span>;</span><br><span class="line">  <span class="attribute">position</span>: relative;</span><br><span class="line">  <span class="attribute">transition</span>: opacity <span class="number">100ms</span> linear <span class="number">500ms</span>;</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">3</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-pseudo">::before</span> &#123;</span><br><span class="line">  <span class="attribute">border-radius</span>: <span class="number">0.25rem</span>;</span><br><span class="line">  <span class="attribute">bottom</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">content</span>: <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">  <span class="attribute">display</span>: block;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">left</span>: <span class="number">50%</span>;</span><br><span class="line">  <span class="attribute">position</span>: absolute;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateX</span>(-<span class="number">50%</span>);</span><br><span class="line">  <span class="attribute">transition</span>: height <span class="number">250ms</span> ease-in-out <span class="number">400ms</span>, width <span class="number">250ms</span> ease-in-out <span class="number">300ms</span>;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">2</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-pseudo">::after</span> &#123;</span><br><span class="line">  <span class="attribute">bottom</span>: -<span class="number">1rem</span>;</span><br><span class="line">  <span class="attribute">color</span>: white;</span><br><span class="line">  <span class="attribute">content</span>: <span class="string">&#x27;ヾ(≧O≦)〃嗷~&#x27;</span>; <span class="comment">/*点击后显示的内容*/</span></span><br><span class="line">  <span class="attribute">height</span>: <span class="number">110%</span>;</span><br><span class="line">  <span class="attribute">left</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">position</span>: absolute;</span><br><span class="line">  <span class="attribute">pointer-events</span>: none;</span><br><span class="line">  <span class="attribute">text-align</span>: center;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">scale</span>(<span class="number">0</span>);</span><br><span class="line">  <span class="attribute">transform-origin</span>: <span class="number">50%</span> <span class="number">20%</span>;</span><br><span class="line">  <span class="attribute">transition</span>: transform <span class="number">200ms</span> <span class="built_in">cubic-bezier</span>(<span class="number">0</span>, <span class="number">0</span>, <span class="number">0.35</span>, <span class="number">1.43</span>);</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">1</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.coin-wrapper</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: none;</span><br><span class="line">  <span class="attribute">bottom</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">18rem</span>;</span><br><span class="line">  <span class="attribute">left</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="number">1</span>;</span><br><span class="line">  <span class="attribute">overflow</span>: hidden;</span><br><span class="line">  <span class="attribute">pointer-events</span>: none;</span><br><span class="line">  <span class="attribute">position</span>: absolute;</span><br><span class="line">  <span class="attribute">transform</span>: none;</span><br><span class="line">  <span class="attribute">transform-origin</span>: <span class="number">50%</span> <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">transition</span>: opacity <span class="number">200ms</span> linear <span class="number">100ms</span>, transform <span class="number">300ms</span> ease-out;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.coin</span> &#123;</span><br><span class="line">  <span class="attr">--front-y-multiplier</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attr">--back-y-multiplier</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attr">--coin-y-multiplier</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attr">--coin-x-multiplier</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attr">--coin-scale-multiplier</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attr">--coin-rotation-multiplier</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attr">--shine-opacity-multiplier</span>: <span class="number">0.4</span>;</span><br><span class="line">  <span class="attr">--shine-bg-multiplier</span>: <span class="number">50%</span>;</span><br><span class="line">  <span class="attribute">bottom</span>: <span class="built_in">calc</span>(<span class="built_in">var</span>(--coin-y-multiplier) * <span class="number">1rem</span> - <span class="number">3.5rem</span>);</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">3.5rem</span>;</span><br><span class="line">  <span class="attribute">margin-bottom</span>: <span class="number">3.05rem</span>;</span><br><span class="line">  <span class="attribute">position</span>: absolute;</span><br><span class="line">  <span class="attribute">right</span>: <span class="built_in">calc</span>(<span class="built_in">var</span>(--coin-x-multiplier) * <span class="number">34%</span> + <span class="number">16%</span>);</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateX</span>(<span class="number">50%</span>) <span class="built_in">scale</span>(<span class="built_in">calc</span>(<span class="number">0.4</span> + <span class="built_in">var</span>(--coin-scale-multiplier))) <span class="built_in">rotate</span>(<span class="built_in">calc</span>(<span class="built_in">var</span>(--coin-rotation-multiplier) * -<span class="number">1deg</span>));</span><br><span class="line">  <span class="attribute">transition</span>: opacity <span class="number">100ms</span> linear <span class="number">200ms</span>;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">3.5rem</span>;</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">3</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.coin__front</span>, <span class="selector-class">.coin__middle</span>, <span class="selector-class">.coin__back</span>, <span class="selector-class">.coin</span><span class="selector-pseudo">::before</span>, <span class="selector-class">.coin__front</span><span class="selector-pseudo">::after</span>, <span class="selector-class">.coin__back</span><span class="selector-pseudo">::after</span> &#123;</span><br><span class="line">  <span class="attribute">border-radius</span>: <span class="number">50%</span>;</span><br><span class="line">  <span class="attribute">box-sizing</span>: border-box;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">left</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">position</span>: absolute;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">3</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.coin__front</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">radial-gradient</span>(circle at <span class="number">50%</span> <span class="number">50%</span>, transparent <span class="number">50%</span>, <span class="built_in">rgba</span>(<span class="number">115</span>, <span class="number">124</span>, <span class="number">153</span>, <span class="number">0.4</span>) <span class="number">54%</span>, <span class="number">#c2cadf</span> <span class="number">54%</span>), <span class="built_in">linear-gradient</span>(<span class="number">210deg</span>, <span class="number">#8590b3</span> <span class="number">32%</span>, transparent <span class="number">32%</span>), <span class="built_in">linear-gradient</span>(<span class="number">150deg</span>, <span class="number">#8590b3</span> <span class="number">32%</span>, transparent <span class="number">32%</span>), <span class="built_in">linear-gradient</span>(to right, <span class="number">#8590b3</span> <span class="number">22%</span>, transparent <span class="number">22%</span>, transparent <span class="number">78%</span>, <span class="number">#8590b3</span> <span class="number">78%</span>), <span class="built_in">linear-gradient</span>(to bottom, <span class="number">#fcfaf9</span> <span class="number">44%</span>, transparent <span class="number">44%</span>, transparent <span class="number">65%</span>, <span class="number">#fcfaf9</span> <span class="number">65%</span>, <span class="number">#fcfaf9</span> <span class="number">71%</span>, <span class="number">#8590b3</span> <span class="number">71%</span>), <span class="built_in">linear-gradient</span>(to right, transparent <span class="number">28%</span>, <span class="number">#fcfaf9</span> <span class="number">28%</span>, <span class="number">#fcfaf9</span> <span class="number">34%</span>, <span class="number">#8590b3</span> <span class="number">34%</span>, <span class="number">#8590b3</span> <span class="number">40%</span>, <span class="number">#fcfaf9</span> <span class="number">40%</span>, <span class="number">#fcfaf9</span> <span class="number">47%</span>, <span class="number">#8590b3</span> <span class="number">47%</span>, <span class="number">#8590b3</span> <span class="number">53%</span>, <span class="number">#fcfaf9</span> <span class="number">53%</span>, <span class="number">#fcfaf9</span> <span class="number">60%</span>, <span class="number">#8590b3</span> <span class="number">60%</span>, <span class="number">#8590b3</span> <span class="number">66%</span>, <span class="number">#fcfaf9</span> <span class="number">66%</span>, <span class="number">#fcfaf9</span> <span class="number">72%</span>, transparent <span class="number">72%</span>);</span><br><span class="line">  <span class="attribute">background-color</span>: <span class="number">#8590b3</span>;</span><br><span class="line">  <span class="attribute">background-size</span>: <span class="number">100%</span> <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateY</span>(<span class="built_in">calc</span>(<span class="built_in">var</span>(--front-y-multiplier) * <span class="number">0.3181818182rem</span> / <span class="number">2</span>)) <span class="built_in">scaleY</span>(<span class="built_in">var</span>(--front-scale-multiplier));</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.coin__front</span><span class="selector-pseudo">::after</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">rgba</span>(<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0.2</span>);</span><br><span class="line">  <span class="attribute">content</span>: <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="built_in">var</span>(--front-y-multiplier);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.coin__middle</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="number">#737c99</span>;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateY</span>(<span class="built_in">calc</span>(<span class="built_in">var</span>(--middle-y-multiplier) * <span class="number">0.3181818182rem</span> / <span class="number">2</span>)) <span class="built_in">scaleY</span>(<span class="built_in">var</span>(--middle-scale-multiplier));</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.coin__back</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">radial-gradient</span>(circle at <span class="number">50%</span> <span class="number">50%</span>, transparent <span class="number">50%</span>, <span class="built_in">rgba</span>(<span class="number">115</span>, <span class="number">124</span>, <span class="number">153</span>, <span class="number">0.4</span>) <span class="number">54%</span>, <span class="number">#c2cadf</span> <span class="number">54%</span>), <span class="built_in">radial-gradient</span>(circle at <span class="number">50%</span> <span class="number">40%</span>, <span class="number">#fcfaf9</span> <span class="number">23%</span>, transparent <span class="number">23%</span>), <span class="built_in">radial-gradient</span>(circle at <span class="number">50%</span> <span class="number">100%</span>, <span class="number">#fcfaf9</span> <span class="number">35%</span>, transparent <span class="number">35%</span>);</span><br><span class="line">  <span class="attribute">background-color</span>: <span class="number">#8590b3</span>;</span><br><span class="line">  <span class="attribute">background-size</span>: <span class="number">100%</span> <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateY</span>(<span class="built_in">calc</span>(<span class="built_in">var</span>(--back-y-multiplier) * <span class="number">0.3181818182rem</span> / <span class="number">2</span>)) <span class="built_in">scaleY</span>(<span class="built_in">var</span>(--back-scale-multiplier));</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.coin__back</span><span class="selector-pseudo">::after</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">rgba</span>(<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0.2</span>);</span><br><span class="line">  <span class="attribute">content</span>: <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="built_in">var</span>(--back-y-multiplier);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.coin</span><span class="selector-pseudo">::before</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">radial-gradient</span>(circle at <span class="number">25%</span> <span class="number">65%</span>, transparent <span class="number">50%</span>, <span class="built_in">rgba</span>(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">0.9</span>) <span class="number">90%</span>), <span class="built_in">linear-gradient</span>(<span class="number">55deg</span>, transparent <span class="built_in">calc</span>(<span class="built_in">var</span>(--shine-bg-multiplier) + <span class="number">0%</span>), <span class="number">#e9f4ff</span> <span class="built_in">calc</span>(<span class="built_in">var</span>(--shine-bg-multiplier) + <span class="number">0%</span>), transparent <span class="built_in">calc</span>(<span class="built_in">var</span>(--shine-bg-multiplier) + <span class="number">50%</span>));</span><br><span class="line">  <span class="attribute">content</span>: <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="built_in">var</span>(--shine-opacity-multiplier);</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateY</span>(<span class="built_in">calc</span>(<span class="built_in">var</span>(--middle-y-multiplier) * <span class="number">0.3181818182rem</span> / -<span class="number">2</span>)) <span class="built_in">scaleY</span>(<span class="built_in">var</span>(--middle-scale-multiplier)) <span class="built_in">rotate</span>(<span class="built_in">calc</span>(<span class="built_in">var</span>(--coin-rotation-multiplier) * <span class="number">1deg</span>));</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">10</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.coin</span><span class="selector-pseudo">::after</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="number">#737c99</span>;</span><br><span class="line">  <span class="attribute">content</span>: <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">0.3181818182rem</span>;</span><br><span class="line">  <span class="attribute">left</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">position</span>: absolute;</span><br><span class="line">  <span class="attribute">top</span>: <span class="number">50%</span>;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateY</span>(-<span class="number">50%</span>);</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">2</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">@keyframes</span> shake &#123;</span><br><span class="line">  <span class="number">0%</span> &#123;</span><br><span class="line">    <span class="attribute">transform</span>: <span class="built_in">rotate</span>(<span class="number">4deg</span>);</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="number">66%</span> &#123;</span><br><span class="line">    <span class="attribute">transform</span>: <span class="built_in">rotate</span>(-<span class="number">4deg</span>);</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="number">100%</span> &#123;</span><br><span class="line">    <span class="attribute">transform</span>: <span class="built_in">rotate</span>();</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></li><li>新建<code>[Blogroot]\themes\butterfly\source\js\coin.js</code><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> tipButtons = <span class="variable language_">document</span>.<span class="title function_">querySelectorAll</span>(<span class="string">&#x27;.tip-button&#x27;</span>)</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">coinAudio</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> coinAudio = <span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&quot;coinAudio&quot;</span>);</span><br><span class="line">  <span class="keyword">if</span> (coinAudio) &#123;</span><br><span class="line">    coinAudio.<span class="title function_">play</span>();<span class="comment">//有音频时播放</span></span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="comment">// Loop through all buttons (allows for multiple buttons on page)</span></span><br><span class="line">tipButtons.<span class="title function_">forEach</span>(<span class="function">(<span class="params">button</span>) =&gt;</span> &#123;</span><br><span class="line">  <span class="keyword">var</span> coin = button.<span class="title function_">querySelector</span>(<span class="string">&#x27;.coin&#x27;</span>)</span><br><span class="line"></span><br><span class="line">  <span class="comment">// The larger the number, the slower the animation</span></span><br><span class="line">  coin.<span class="property">maxMoveLoopCount</span> = <span class="number">90</span></span><br><span class="line"></span><br><span class="line">  button.<span class="title function_">addEventListener</span>(<span class="string">&#x27;click&#x27;</span>, <span class="function">() =&gt;</span> &#123;</span><br><span class="line">    <span class="keyword">if</span> (<span class="regexp">/Android|webOS|BlackBerry/i</span>.<span class="title function_">test</span>(navigator.<span class="property">userAgent</span>)) <span class="keyword">return</span> <span class="literal">true</span>; <span class="comment">//媒体选择</span></span><br><span class="line">    <span class="keyword">if</span> (button.<span class="property">clicked</span>) <span class="keyword">return</span></span><br><span class="line">    button.<span class="property">classList</span>.<span class="title function_">add</span>(<span class="string">&#x27;clicked&#x27;</span>)</span><br><span class="line"></span><br><span class="line">    <span class="comment">// Wait to start flipping th coin because of the button tilt animation</span></span><br><span class="line">    <span class="built_in">setTimeout</span>(<span class="function">() =&gt;</span> &#123;</span><br><span class="line">      <span class="comment">// Randomize the flipping speeds just for fun</span></span><br><span class="line">      coin.<span class="property">sideRotationCount</span> = <span class="title class_">Math</span>.<span class="title function_">floor</span>(<span class="title class_">Math</span>.<span class="title function_">random</span>() * <span class="number">5</span>) * <span class="number">90</span></span><br><span class="line">      coin.<span class="property">maxFlipAngle</span> = (<span class="title class_">Math</span>.<span class="title function_">floor</span>(<span class="title class_">Math</span>.<span class="title function_">random</span>() * <span class="number">4</span>) + <span class="number">3</span>) * <span class="title class_">Math</span>.<span class="property">PI</span></span><br><span class="line">      button.<span class="property">clicked</span> = <span class="literal">true</span></span><br><span class="line">      <span class="title function_">flipCoin</span>()</span><br><span class="line">      <span class="title function_">coinAudio</span>()</span><br><span class="line">    &#125;, <span class="number">50</span>)</span><br><span class="line">  &#125;)</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> <span class="title function_">flipCoin</span> = (<span class="params"></span>) =&gt; &#123;</span><br><span class="line">    coin.<span class="property">moveLoopCount</span> = <span class="number">0</span></span><br><span class="line">    <span class="title function_">flipCoinLoop</span>()</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> <span class="title function_">resetCoin</span> = (<span class="params"></span>) =&gt; &#123;</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--coin-x-multiplier&#x27;</span>, <span class="number">0</span>)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--coin-scale-multiplier&#x27;</span>, <span class="number">0</span>)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--coin-rotation-multiplier&#x27;</span>, <span class="number">0</span>)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--shine-opacity-multiplier&#x27;</span>, <span class="number">0.4</span>)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--shine-bg-multiplier&#x27;</span>, <span class="string">&#x27;50%&#x27;</span>)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;opacity&#x27;</span>, <span class="number">1</span>)</span><br><span class="line">    <span class="comment">// Delay to give the reset animation some time before you can click again</span></span><br><span class="line">    <span class="built_in">setTimeout</span>(<span class="function">() =&gt;</span> &#123;</span><br><span class="line">      button.<span class="property">clicked</span> = <span class="literal">false</span></span><br><span class="line">    &#125;, <span class="number">300</span>)</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> <span class="title function_">flipCoinLoop</span> = (<span class="params"></span>) =&gt; &#123;</span><br><span class="line">    coin.<span class="property">moveLoopCount</span>++</span><br><span class="line">    <span class="keyword">var</span> percentageCompleted = coin.<span class="property">moveLoopCount</span> / coin.<span class="property">maxMoveLoopCount</span></span><br><span class="line">    coin.<span class="property">angle</span> = -coin.<span class="property">maxFlipAngle</span> * <span class="title class_">Math</span>.<span class="title function_">pow</span>((percentageCompleted - <span class="number">1</span>), <span class="number">2</span>) + coin.<span class="property">maxFlipAngle</span></span><br><span class="line"></span><br><span class="line">    <span class="comment">// Calculate the scale and position of the coin moving through the air</span></span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--coin-y-multiplier&#x27;</span>, -<span class="number">11</span> * <span class="title class_">Math</span>.<span class="title function_">pow</span>(percentageCompleted * <span class="number">2</span> - <span class="number">1</span>, <span class="number">4</span>) + <span class="number">11</span>)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--coin-x-multiplier&#x27;</span>, percentageCompleted)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--coin-scale-multiplier&#x27;</span>, percentageCompleted * <span class="number">0.6</span>)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--coin-rotation-multiplier&#x27;</span>, percentageCompleted * coin.<span class="property">sideRotationCount</span>)</span><br><span class="line"></span><br><span class="line">    <span class="comment">// Calculate the scale and position values for the different coin faces</span></span><br><span class="line">    <span class="comment">// The math uses sin/cos wave functions to similate the circular motion of 3D spin</span></span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--front-scale-multiplier&#x27;</span>, <span class="title class_">Math</span>.<span class="title function_">max</span>(<span class="title class_">Math</span>.<span class="title function_">cos</span>(coin.<span class="property">angle</span>), <span class="number">0</span>))</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--front-y-multiplier&#x27;</span>, <span class="title class_">Math</span>.<span class="title function_">sin</span>(coin.<span class="property">angle</span>))</span><br><span class="line"></span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--middle-scale-multiplier&#x27;</span>, <span class="title class_">Math</span>.<span class="title function_">abs</span>(<span class="title class_">Math</span>.<span class="title function_">cos</span>(coin.<span class="property">angle</span>), <span class="number">0</span>))</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--middle-y-multiplier&#x27;</span>, <span class="title class_">Math</span>.<span class="title function_">cos</span>((coin.<span class="property">angle</span> + <span class="title class_">Math</span>.<span class="property">PI</span> / <span class="number">2</span>) % <span class="title class_">Math</span>.<span class="property">PI</span>))</span><br><span class="line"></span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--back-scale-multiplier&#x27;</span>, <span class="title class_">Math</span>.<span class="title function_">max</span>(<span class="title class_">Math</span>.<span class="title function_">cos</span>(coin.<span class="property">angle</span> - <span class="title class_">Math</span>.<span class="property">PI</span>), <span class="number">0</span>))</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--back-y-multiplier&#x27;</span>, <span class="title class_">Math</span>.<span class="title function_">sin</span>(coin.<span class="property">angle</span> - <span class="title class_">Math</span>.<span class="property">PI</span>))</span><br><span class="line"></span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--shine-opacity-multiplier&#x27;</span>, <span class="number">4</span> * <span class="title class_">Math</span>.<span class="title function_">sin</span>((coin.<span class="property">angle</span> + <span class="title class_">Math</span>.<span class="property">PI</span> / <span class="number">2</span>) % <span class="title class_">Math</span>.<span class="property">PI</span>) - <span class="number">3.2</span>)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--shine-bg-multiplier&#x27;</span>, -<span class="number">40</span> * (<span class="title class_">Math</span>.<span class="title function_">cos</span>((coin.<span class="property">angle</span> + <span class="title class_">Math</span>.<span class="property">PI</span> / <span class="number">2</span>) % <span class="title class_">Math</span>.<span class="property">PI</span>) - <span class="number">0.5</span>) + <span class="string">&#x27;%&#x27;</span>)</span><br><span class="line"></span><br><span class="line">    <span class="comment">// Repeat animation loop</span></span><br><span class="line">    <span class="keyword">if</span> (coin.<span class="property">moveLoopCount</span> &lt; coin.<span class="property">maxMoveLoopCount</span>) &#123;</span><br><span class="line">      <span class="keyword">if</span> (coin.<span class="property">moveLoopCount</span> === coin.<span class="property">maxMoveLoopCount</span> - <span class="number">6</span>) button.<span class="property">classList</span>.<span class="title function_">add</span>(<span class="string">&#x27;shrink-landing&#x27;</span>)</span><br><span class="line">      <span class="variable language_">window</span>.<span class="title function_">requestAnimationFrame</span>(flipCoinLoop)</span><br><span class="line">    &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">      button.<span class="property">classList</span>.<span class="title function_">add</span>(<span class="string">&#x27;coin-landed&#x27;</span>)</span><br><span class="line">      coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;opacity&#x27;</span>, <span class="number">0</span>)</span><br><span class="line">      <span class="built_in">setTimeout</span>(<span class="function">() =&gt;</span> &#123;</span><br><span class="line">        button.<span class="property">classList</span>.<span class="title function_">remove</span>(<span class="string">&#x27;clicked&#x27;</span>, <span class="string">&#x27;shrink-landing&#x27;</span>, <span class="string">&#x27;coin-landed&#x27;</span>)</span><br><span class="line">        <span class="built_in">setTimeout</span>(<span class="function">() =&gt;</span> &#123;</span><br><span class="line">          <span class="title function_">resetCoin</span>()</span><br><span class="line">        &#125;, <span class="number">300</span>)</span><br><span class="line">      &#125;, <span class="number">1500</span>)</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;)</span><br></pre></td></tr></table></figure></li><li>修改<code>_config.butterfly.yml</code>,添加音频文件配置项，添加CDN配置项：<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">  # Sponsor/reward</span><br><span class="line">  reward:</span><br><span class="line">    enable: true</span><br><span class="line"><span class="addition">+   coinAudio: https://npm.elemecdn.com/akilar-candyassets@1.0.16/audio/coin.mp3</span></span><br><span class="line">    QR_code:</span><br><span class="line">    。</span><br><span class="line">    。</span><br><span class="line">    。</span><br><span class="line">  CDN:</span><br><span class="line">    # main</span><br><span class="line">    main_css: /css/index.css</span><br><span class="line">    jquery: https://npm.elemecdn.com/jquery@latest/dist/jquery.min.js</span><br><span class="line">    main: /js/main.js</span><br><span class="line">    utils:/js/utils.js</span><br><span class="line"><span class="addition">+    # 打赏按钮投币效果</span></span><br><span class="line"><span class="addition">+   coin_js: /js/coin.js</span></span><br><span class="line"><span class="addition">+   coin_css: /css/coin.css</span></span><br></pre></td></tr></table></figure></li><li>现在的打赏按钮样式需要稍作适配，当前若提示语太长，悬停时会无法显示完全。需要微调一下,修改<code>[Blogroot]\themes\butterfly\source\css\_layout\reward.styl</code>，整体替换为以下内容：<figure class="highlight stylus"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-class">.post-reward</span></span><br><span class="line">  <span class="attribute">position</span>: relative</span><br><span class="line">  <span class="attribute">margin-top</span>: <span class="number">4rem</span></span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span></span><br><span class="line">  <span class="attribute">text-align</span>: center</span><br><span class="line"></span><br><span class="line">  <span class="selector-class">.reward-button</span></span><br><span class="line">    <span class="attribute">display</span>: inline-block</span><br><span class="line">    <span class="attribute">padding</span>: .<span class="number">2rem</span> <span class="number">1.2rem</span></span><br><span class="line">    <span class="attribute">background</span>: <span class="built_in">var</span>(--btn-bg)</span><br><span class="line">    <span class="attribute">color</span>: <span class="built_in">var</span>(--btn-color)</span><br><span class="line">    <span class="attribute">cursor</span>: pointer</span><br><span class="line">    <span class="attribute">transition</span>: all .<span class="number">4s</span></span><br><span class="line"></span><br><span class="line">    <span class="selector-pseudo">&amp;:hover</span></span><br><span class="line">      <span class="attribute">box-shadow</span>: inset <span class="number">15em</span> <span class="number">0</span> <span class="number">0</span> <span class="number">0</span> <span class="built_in">var</span>(--btn-hover-color)</span><br><span class="line"></span><br><span class="line">      <span class="selector-class">.reward-main</span></span><br><span class="line">        <span class="attribute">display</span>: block</span><br><span class="line"></span><br><span class="line">    <span class="selector-class">.reward-main</span></span><br><span class="line">      <span class="attribute">position</span>: absolute</span><br><span class="line">      <span class="attribute">bottom</span>: <span class="number">40px</span></span><br><span class="line">      <span class="attribute">left</span>: -<span class="number">25%</span></span><br><span class="line">      <span class="attribute">z-index</span>: <span class="number">100</span></span><br><span class="line">      <span class="attribute">display</span>: none</span><br><span class="line">      <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">0</span> <span class="number">15px</span></span><br><span class="line">      <span class="attribute">width</span>: <span class="number">150%</span></span><br><span class="line"></span><br><span class="line">      <span class="selector-class">.reward-all</span></span><br><span class="line">        <span class="attribute">display</span>: inline-block</span><br><span class="line">        <span class="attribute">margin</span>: <span class="number">0</span></span><br><span class="line">        <span class="attribute">padding</span>: <span class="number">1rem</span> .<span class="number">5rem</span></span><br><span class="line">        <span class="attribute">border-radius</span>: <span class="number">4px</span></span><br><span class="line">        <span class="attribute">background</span>: <span class="built_in">var</span>(--reward-pop)</span><br><span class="line"></span><br><span class="line">        <span class="selector-pseudo">&amp;:before</span></span><br><span class="line">          <span class="attribute">position</span>: absolute</span><br><span class="line">          <span class="attribute">bottom</span>: -<span class="number">10px</span></span><br><span class="line">          <span class="attribute">left</span>: <span class="number">0</span></span><br><span class="line">          <span class="attribute">width</span>: <span class="number">100%</span></span><br><span class="line">          <span class="attribute">height</span>: <span class="number">20px</span></span><br><span class="line">          <span class="attribute">content</span>: <span class="string">&#x27;&#x27;</span></span><br><span class="line"></span><br><span class="line">        <span class="selector-pseudo">&amp;:after</span></span><br><span class="line">          <span class="attribute">position</span>: absolute</span><br><span class="line">          <span class="attribute">right</span>: <span class="number">0</span></span><br><span class="line">          <span class="attribute">bottom</span>: <span class="number">2px</span></span><br><span class="line">          <span class="attribute">left</span>: <span class="number">0</span></span><br><span class="line">          <span class="attribute">margin</span>: <span class="number">0</span> auto</span><br><span class="line">          <span class="attribute">width</span>: <span class="number">0</span></span><br><span class="line">          <span class="attribute">height</span>: <span class="number">0</span></span><br><span class="line">          <span class="attribute">border-top</span>: <span class="number">13px</span> solid <span class="built_in">var</span>(--reward-pop)</span><br><span class="line">          <span class="attribute">border-right</span>: <span class="number">13px</span> solid transparent</span><br><span class="line">          <span class="attribute">border-left</span>: <span class="number">13px</span> solid transparent</span><br><span class="line">          <span class="attribute">content</span>: <span class="string">&#x27;&#x27;</span></span><br><span class="line"></span><br><span class="line">        <span class="selector-class">.reward-item</span></span><br><span class="line">          <span class="attribute">display</span>: inline-block</span><br><span class="line">          <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">6px</span></span><br><span class="line">          <span class="attribute">list-style-type</span>: none</span><br><span class="line">          <span class="attribute">vertical-align</span>: top</span><br><span class="line"></span><br><span class="line">          <span class="selector-tag">img</span></span><br><span class="line">            <span class="attribute">width</span>: <span class="number">130px</span></span><br><span class="line">            <span class="attribute">height</span>: <span class="number">130px</span></span><br><span class="line"></span><br><span class="line">          <span class="selector-class">.post-qr-code-desc</span></span><br><span class="line">            <span class="attribute">padding-top</span>: .<span class="number">4rem</span></span><br><span class="line">            <span class="attribute">width</span>: <span class="number">130px</span></span><br><span class="line">            <span class="attribute">color</span>: <span class="variable">$reward</span>-pop-up-color</span><br></pre></td></tr></table></figure>还可以针对自己的情况适度调整以下内容：<ul><li>修改悬停打赏按钮时的颜色填充长度：<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">  .reward-button</span><br><span class="line">    display: inline-block</span><br><span class="line">    padding: .2rem 1.2rem</span><br><span class="line">    background: var(--btn-bg)</span><br><span class="line">    color: var(--btn-color)</span><br><span class="line">    cursor: pointer</span><br><span class="line">    transition: all .4s</span><br><span class="line"></span><br><span class="line">    &amp;:hover</span><br><span class="line"><span class="deletion">-     box-shadow: inset 9em 0 0 0 var(--btn-hover-color)</span></span><br><span class="line"><span class="addition">+     box-shadow: inset 20em 0 0 0 var(--btn-hover-color)</span></span><br></pre></td></tr></table></figure></li><li>修改打赏二维码的样式（仅针对2张二维码的情况，单张不用改动。两张以上需要自己调试这两个参数）<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">  .reward-main</span><br><span class="line">    position: absolute</span><br><span class="line">    bottom: 40px</span><br><span class="line"><span class="deletion">-   left: 0</span></span><br><span class="line"><span class="addition">+   left: -25%</span></span><br><span class="line">    z-index: 100</span><br><span class="line">    display: none</span><br><span class="line">    padding: 0 0 15px</span><br><span class="line"><span class="deletion">-   width: 100%</span></span><br><span class="line"><span class="addition">+   width: 150%</span></span><br></pre></td></tr></table></figure></li></ul></li></ol><button type="button" class="tab-to-top" aria-label="scroll to top"><i class="fas fa-arrow-up"></i></button></div><div class="tab-item-content" id="donate-3"><p></p><div class="note info morden flat"><p>改动文章页下方的打赏按钮，增加投币动画彩蛋。v3.6.0重写了reward.pug,适配起来有动画偏移兼容问题。考虑到这部分是嵌入式样式，所以大可以直接把reward相关内容局部回退至3.5.1。</p></div><p></p><ol><li>修改<code>[Blogroot]\themes\butterfly\layout\includes\post\reward.pug</code>,整体替换为以下内容：<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line">link(rel=<span class="string">&#x27;stylesheet&#x27;</span> href=url_for(theme.CDN.coin_css) media=<span class="string">&quot;defer&quot;</span> onload=<span class="string">&quot;this.media=&#x27;all&#x27;&quot;</span>)</span><br><span class="line">.post-reward</span><br><span class="line">  button.tip-button.reward-button</span><br><span class="line">    span.tip-button__text= _p(<span class="string">&#x27;donate&#x27;</span>)</span><br><span class="line">    .coin-wrapper</span><br><span class="line">      .coin</span><br><span class="line">        .coin__middle</span><br><span class="line">        .coin__back</span><br><span class="line">        .coin__front</span><br><span class="line">    .reward-main</span><br><span class="line">      ul.reward-<span class="built_in">all</span></span><br><span class="line">        each item <span class="keyword">in</span> theme.reward.QR_code</span><br><span class="line">          - var clickTo = (item.itemlist||item).link ? (item.itemlist||item).link : (item.itemlist||item).img</span><br><span class="line">          li.reward-item</span><br><span class="line">            a(href=clickTo target=<span class="string">&#x27;_blank&#x27;</span>)</span><br><span class="line">              img.post-qr-code-img(src=url_for((item.itemlist||item).img) alt=(item.itemlist||item).text)</span><br><span class="line">            .post-qr-code-desc=(item.itemlist||item).text</span><br><span class="line"><span class="keyword">if</span> theme.reward.coinAudio</span><br><span class="line">  - var coinAudio = theme.reward.coinAudio ? url_for(theme.reward.coinAudio) : <span class="string">&#x27;https://npm.elemecdn.com/akilar-candyassets@1.0.16/audio/coin.mp3&#x27;</span></span><br><span class="line">  audio<span class="comment">#coinAudio(src=coinAudio)</span></span><br><span class="line">script(defer src=url_for(theme.CDN.coin_js))</span><br></pre></td></tr></table></figure></li><li>新建<code>[Blogroot]\themes\butterfly\source\css\coin.css</code><figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-class">.tip-button</span> &#123;</span><br><span class="line">  <span class="attribute">border</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">border-radius</span>: <span class="number">0.25rem</span>;</span><br><span class="line">  <span class="attribute">cursor</span>: pointer;</span><br><span class="line">  <span class="attribute">font-size</span>: <span class="number">20px</span>;</span><br><span class="line">  <span class="attribute">font-weight</span>: <span class="number">600</span>;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">2.6rem</span>;</span><br><span class="line">  <span class="attribute">margin-bottom</span>: -<span class="number">4rem</span>;</span><br><span class="line">  <span class="attribute">outline</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">position</span>: relative;</span><br><span class="line">  <span class="attribute">top</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">transform-origin</span>: <span class="number">0%</span> <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">transition</span>: transform <span class="number">50ms</span> ease-in-out;</span><br><span class="line">  <span class="attribute">width</span>: auto;</span><br><span class="line">  -webkit-tap-highlight-<span class="attribute">color</span>: transparent;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-pseudo">:active</span> &#123;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">rotate</span>(<span class="number">4deg</span>);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-class">.clicked</span> &#123;</span><br><span class="line">  <span class="attribute">animation</span>: <span class="number">150ms</span> ease-in-out <span class="number">1</span> shake;</span><br><span class="line">  <span class="attribute">pointer-events</span>: none;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-class">.clicked</span> <span class="selector-class">.tip-button__text</span> &#123;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">transition</span>: opacity <span class="number">100ms</span> linear <span class="number">200ms</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-class">.clicked</span><span class="selector-pseudo">::before</span> &#123;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">0.5rem</span>;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">60%</span>;</span><br><span class="line">  <span class="attribute">background</span>: $button-hover-color;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-class">.clicked</span> <span class="selector-class">.coin</span> &#123;</span><br><span class="line">  <span class="attribute">transition</span>: margin-bottom <span class="number">1s</span> linear <span class="number">200ms</span>;</span><br><span class="line">  <span class="attribute">margin-bottom</span>: <span class="number">0</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-class">.shrink-landing</span><span class="selector-pseudo">::before</span> &#123;</span><br><span class="line">  <span class="attribute">transition</span>: width <span class="number">200ms</span> ease-in;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">0</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-class">.coin-landed</span><span class="selector-pseudo">::after</span> &#123;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="number">1</span>;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">  <span class="attribute">transform-origin</span>: <span class="number">50%</span> <span class="number">100%</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-class">.coin-landed</span> <span class="selector-class">.coin-wrapper</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">radial-gradient</span>(circle at <span class="number">35%</span> <span class="number">97%</span>, <span class="built_in">rgba</span>(<span class="number">3</span>, <span class="number">16</span>, <span class="number">50</span>, <span class="number">0.4</span>) <span class="number">0.04rem</span>, transparent <span class="number">0.04rem</span>), <span class="built_in">radial-gradient</span>(circle at <span class="number">45%</span> <span class="number">92%</span>, <span class="built_in">rgba</span>(<span class="number">3</span>, <span class="number">16</span>, <span class="number">50</span>, <span class="number">0.4</span>) <span class="number">0.04rem</span>, transparent <span class="number">0.02rem</span>), <span class="built_in">radial-gradient</span>(circle at <span class="number">55%</span> <span class="number">98%</span>, <span class="built_in">rgba</span>(<span class="number">3</span>, <span class="number">16</span>, <span class="number">50</span>, <span class="number">0.4</span>) <span class="number">0.04rem</span>, transparent <span class="number">0.04rem</span>), <span class="built_in">radial-gradient</span>(circle at <span class="number">65%</span> <span class="number">96%</span>, <span class="built_in">rgba</span>(<span class="number">3</span>, <span class="number">16</span>, <span class="number">50</span>, <span class="number">0.4</span>) <span class="number">0.06rem</span>, transparent <span class="number">0.06rem</span>);</span><br><span class="line">  <span class="attribute">background-position</span>: center bottom;</span><br><span class="line">  <span class="attribute">background-size</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">bottom</span>: -<span class="number">1rem</span>;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">scale</span>(<span class="number">2</span>) <span class="built_in">translateY</span>(-<span class="number">10px</span>);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button__text</span> &#123;</span><br><span class="line">  <span class="attribute">color</span>: <span class="number">#fff</span>;</span><br><span class="line">  <span class="attribute">margin-right</span>: <span class="number">1.8rem</span>;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="number">1</span>;</span><br><span class="line">  <span class="attribute">position</span>: relative;</span><br><span class="line">  <span class="attribute">transition</span>: opacity <span class="number">100ms</span> linear <span class="number">500ms</span>;</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">3</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-pseudo">::before</span> &#123;</span><br><span class="line">  <span class="attribute">border-radius</span>: <span class="number">0.25rem</span>;</span><br><span class="line">  <span class="attribute">bottom</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">content</span>: <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">  <span class="attribute">display</span>: block;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">left</span>: <span class="number">50%</span>;</span><br><span class="line">  <span class="attribute">position</span>: absolute;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateX</span>(-<span class="number">50%</span>);</span><br><span class="line">  <span class="attribute">transition</span>: height <span class="number">250ms</span> ease-in-out <span class="number">400ms</span>, width <span class="number">250ms</span> ease-in-out <span class="number">300ms</span>;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">2</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tip-button</span><span class="selector-pseudo">::after</span> &#123;</span><br><span class="line">  <span class="attribute">bottom</span>: -<span class="number">1rem</span>;</span><br><span class="line">  <span class="attribute">color</span>: white;</span><br><span class="line">  <span class="attribute">content</span>: <span class="string">&#x27;ヾ(≧O≦)〃嗷~&#x27;</span>; <span class="comment">/*点击后显示的内容*/</span></span><br><span class="line">  <span class="attribute">height</span>: <span class="number">110%</span>;</span><br><span class="line">  <span class="attribute">left</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">position</span>: absolute;</span><br><span class="line">  <span class="attribute">pointer-events</span>: none;</span><br><span class="line">  <span class="attribute">text-align</span>: center;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">scale</span>(<span class="number">0</span>);</span><br><span class="line">  <span class="attribute">transform-origin</span>: <span class="number">50%</span> <span class="number">20%</span>;</span><br><span class="line">  <span class="attribute">transition</span>: transform <span class="number">200ms</span> <span class="built_in">cubic-bezier</span>(<span class="number">0</span>, <span class="number">0</span>, <span class="number">0.35</span>, <span class="number">1.43</span>);</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">1</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.coin-wrapper</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: none;</span><br><span class="line">  <span class="attribute">bottom</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">18rem</span>;</span><br><span class="line">  <span class="attribute">left</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="number">1</span>;</span><br><span class="line">  <span class="attribute">overflow</span>: hidden;</span><br><span class="line">  <span class="attribute">pointer-events</span>: none;</span><br><span class="line">  <span class="attribute">position</span>: absolute;</span><br><span class="line">  <span class="attribute">transform</span>: none;</span><br><span class="line">  <span class="attribute">transform-origin</span>: <span class="number">50%</span> <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">transition</span>: opacity <span class="number">200ms</span> linear <span class="number">100ms</span>, transform <span class="number">300ms</span> ease-out;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.coin</span> &#123;</span><br><span class="line">  <span class="attr">--front-y-multiplier</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attr">--back-y-multiplier</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attr">--coin-y-multiplier</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attr">--coin-x-multiplier</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attr">--coin-scale-multiplier</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attr">--coin-rotation-multiplier</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attr">--shine-opacity-multiplier</span>: <span class="number">0.4</span>;</span><br><span class="line">  <span class="attr">--shine-bg-multiplier</span>: <span class="number">50%</span>;</span><br><span class="line">  <span class="attribute">bottom</span>: <span class="built_in">calc</span>(<span class="built_in">var</span>(--coin-y-multiplier) * <span class="number">1rem</span> - <span class="number">3.5rem</span>);</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">3.5rem</span>;</span><br><span class="line">  <span class="attribute">margin-bottom</span>: <span class="number">3.05rem</span>;</span><br><span class="line">  <span class="attribute">position</span>: absolute;</span><br><span class="line">  <span class="attribute">right</span>: <span class="built_in">calc</span>(<span class="built_in">var</span>(--coin-x-multiplier) * <span class="number">34%</span> + <span class="number">16%</span>);</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateX</span>(<span class="number">50%</span>) <span class="built_in">scale</span>(<span class="built_in">calc</span>(<span class="number">0.4</span> + <span class="built_in">var</span>(--coin-scale-multiplier))) <span class="built_in">rotate</span>(<span class="built_in">calc</span>(<span class="built_in">var</span>(--coin-rotation-multiplier) * -<span class="number">1deg</span>));</span><br><span class="line">  <span class="attribute">transition</span>: opacity <span class="number">100ms</span> linear <span class="number">200ms</span>;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">3.5rem</span>;</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">3</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.coin__front</span>, <span class="selector-class">.coin__middle</span>, <span class="selector-class">.coin__back</span>, <span class="selector-class">.coin</span><span class="selector-pseudo">::before</span>, <span class="selector-class">.coin__front</span><span class="selector-pseudo">::after</span>, <span class="selector-class">.coin__back</span><span class="selector-pseudo">::after</span> &#123;</span><br><span class="line">  <span class="attribute">border-radius</span>: <span class="number">50%</span>;</span><br><span class="line">  <span class="attribute">box-sizing</span>: border-box;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">left</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">position</span>: absolute;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">3</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.coin__front</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">radial-gradient</span>(circle at <span class="number">50%</span> <span class="number">50%</span>, transparent <span class="number">50%</span>, <span class="built_in">rgba</span>(<span class="number">115</span>, <span class="number">124</span>, <span class="number">153</span>, <span class="number">0.4</span>) <span class="number">54%</span>, <span class="number">#c2cadf</span> <span class="number">54%</span>), <span class="built_in">linear-gradient</span>(<span class="number">210deg</span>, <span class="number">#8590b3</span> <span class="number">32%</span>, transparent <span class="number">32%</span>), <span class="built_in">linear-gradient</span>(<span class="number">150deg</span>, <span class="number">#8590b3</span> <span class="number">32%</span>, transparent <span class="number">32%</span>), <span class="built_in">linear-gradient</span>(to right, <span class="number">#8590b3</span> <span class="number">22%</span>, transparent <span class="number">22%</span>, transparent <span class="number">78%</span>, <span class="number">#8590b3</span> <span class="number">78%</span>), <span class="built_in">linear-gradient</span>(to bottom, <span class="number">#fcfaf9</span> <span class="number">44%</span>, transparent <span class="number">44%</span>, transparent <span class="number">65%</span>, <span class="number">#fcfaf9</span> <span class="number">65%</span>, <span class="number">#fcfaf9</span> <span class="number">71%</span>, <span class="number">#8590b3</span> <span class="number">71%</span>), <span class="built_in">linear-gradient</span>(to right, transparent <span class="number">28%</span>, <span class="number">#fcfaf9</span> <span class="number">28%</span>, <span class="number">#fcfaf9</span> <span class="number">34%</span>, <span class="number">#8590b3</span> <span class="number">34%</span>, <span class="number">#8590b3</span> <span class="number">40%</span>, <span class="number">#fcfaf9</span> <span class="number">40%</span>, <span class="number">#fcfaf9</span> <span class="number">47%</span>, <span class="number">#8590b3</span> <span class="number">47%</span>, <span class="number">#8590b3</span> <span class="number">53%</span>, <span class="number">#fcfaf9</span> <span class="number">53%</span>, <span class="number">#fcfaf9</span> <span class="number">60%</span>, <span class="number">#8590b3</span> <span class="number">60%</span>, <span class="number">#8590b3</span> <span class="number">66%</span>, <span class="number">#fcfaf9</span> <span class="number">66%</span>, <span class="number">#fcfaf9</span> <span class="number">72%</span>, transparent <span class="number">72%</span>);</span><br><span class="line">  <span class="attribute">background-color</span>: <span class="number">#8590b3</span>;</span><br><span class="line">  <span class="attribute">background-size</span>: <span class="number">100%</span> <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateY</span>(<span class="built_in">calc</span>(<span class="built_in">var</span>(--front-y-multiplier) * <span class="number">0.3181818182rem</span> / <span class="number">2</span>)) <span class="built_in">scaleY</span>(<span class="built_in">var</span>(--front-scale-multiplier));</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.coin__front</span><span class="selector-pseudo">::after</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">rgba</span>(<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0.2</span>);</span><br><span class="line">  <span class="attribute">content</span>: <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="built_in">var</span>(--front-y-multiplier);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.coin__middle</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="number">#737c99</span>;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateY</span>(<span class="built_in">calc</span>(<span class="built_in">var</span>(--middle-y-multiplier) * <span class="number">0.3181818182rem</span> / <span class="number">2</span>)) <span class="built_in">scaleY</span>(<span class="built_in">var</span>(--middle-scale-multiplier));</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.coin__back</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">radial-gradient</span>(circle at <span class="number">50%</span> <span class="number">50%</span>, transparent <span class="number">50%</span>, <span class="built_in">rgba</span>(<span class="number">115</span>, <span class="number">124</span>, <span class="number">153</span>, <span class="number">0.4</span>) <span class="number">54%</span>, <span class="number">#c2cadf</span> <span class="number">54%</span>), <span class="built_in">radial-gradient</span>(circle at <span class="number">50%</span> <span class="number">40%</span>, <span class="number">#fcfaf9</span> <span class="number">23%</span>, transparent <span class="number">23%</span>), <span class="built_in">radial-gradient</span>(circle at <span class="number">50%</span> <span class="number">100%</span>, <span class="number">#fcfaf9</span> <span class="number">35%</span>, transparent <span class="number">35%</span>);</span><br><span class="line">  <span class="attribute">background-color</span>: <span class="number">#8590b3</span>;</span><br><span class="line">  <span class="attribute">background-size</span>: <span class="number">100%</span> <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateY</span>(<span class="built_in">calc</span>(<span class="built_in">var</span>(--back-y-multiplier) * <span class="number">0.3181818182rem</span> / <span class="number">2</span>)) <span class="built_in">scaleY</span>(<span class="built_in">var</span>(--back-scale-multiplier));</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.coin__back</span><span class="selector-pseudo">::after</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">rgba</span>(<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0.2</span>);</span><br><span class="line">  <span class="attribute">content</span>: <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="built_in">var</span>(--back-y-multiplier);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.coin</span><span class="selector-pseudo">::before</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">radial-gradient</span>(circle at <span class="number">25%</span> <span class="number">65%</span>, transparent <span class="number">50%</span>, <span class="built_in">rgba</span>(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">0.9</span>) <span class="number">90%</span>), <span class="built_in">linear-gradient</span>(<span class="number">55deg</span>, transparent <span class="built_in">calc</span>(<span class="built_in">var</span>(--shine-bg-multiplier) + <span class="number">0%</span>), <span class="number">#e9f4ff</span> <span class="built_in">calc</span>(<span class="built_in">var</span>(--shine-bg-multiplier) + <span class="number">0%</span>), transparent <span class="built_in">calc</span>(<span class="built_in">var</span>(--shine-bg-multiplier) + <span class="number">50%</span>));</span><br><span class="line">  <span class="attribute">content</span>: <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">  <span class="attribute">opacity</span>: <span class="built_in">var</span>(--shine-opacity-multiplier);</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateY</span>(<span class="built_in">calc</span>(<span class="built_in">var</span>(--middle-y-multiplier) * <span class="number">0.3181818182rem</span> / -<span class="number">2</span>)) <span class="built_in">scaleY</span>(<span class="built_in">var</span>(--middle-scale-multiplier)) <span class="built_in">rotate</span>(<span class="built_in">calc</span>(<span class="built_in">var</span>(--coin-rotation-multiplier) * <span class="number">1deg</span>));</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">10</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.coin</span><span class="selector-pseudo">::after</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="number">#737c99</span>;</span><br><span class="line">  <span class="attribute">content</span>: <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">0.3181818182rem</span>;</span><br><span class="line">  <span class="attribute">left</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">position</span>: absolute;</span><br><span class="line">  <span class="attribute">top</span>: <span class="number">50%</span>;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateY</span>(-<span class="number">50%</span>);</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">2</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">@keyframes</span> shake &#123;</span><br><span class="line">  <span class="number">0%</span> &#123;</span><br><span class="line">    <span class="attribute">transform</span>: <span class="built_in">rotate</span>(<span class="number">4deg</span>);</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="number">66%</span> &#123;</span><br><span class="line">    <span class="attribute">transform</span>: <span class="built_in">rotate</span>(-<span class="number">4deg</span>);</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="number">100%</span> &#123;</span><br><span class="line">    <span class="attribute">transform</span>: <span class="built_in">rotate</span>();</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></li><li>新建<code>[Blogroot]\themes\butterfly\source\js\coin.js</code><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> tipButtons = <span class="variable language_">document</span>.<span class="title function_">querySelectorAll</span>(<span class="string">&#x27;.tip-button&#x27;</span>)</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">coinAudio</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> coinAudio = <span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&quot;coinAudio&quot;</span>);</span><br><span class="line">  <span class="keyword">if</span> (coinAudio) &#123;</span><br><span class="line">    coinAudio.<span class="title function_">play</span>();<span class="comment">//有音频时播放</span></span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="comment">// Loop through all buttons (allows for multiple buttons on page)</span></span><br><span class="line">tipButtons.<span class="title function_">forEach</span>(<span class="function">(<span class="params">button</span>) =&gt;</span> &#123;</span><br><span class="line">  <span class="keyword">var</span> coin = button.<span class="title function_">querySelector</span>(<span class="string">&#x27;.coin&#x27;</span>)</span><br><span class="line"></span><br><span class="line">  <span class="comment">// The larger the number, the slower the animation</span></span><br><span class="line">  coin.<span class="property">maxMoveLoopCount</span> = <span class="number">90</span></span><br><span class="line"></span><br><span class="line">  button.<span class="title function_">addEventListener</span>(<span class="string">&#x27;click&#x27;</span>, <span class="function">() =&gt;</span> &#123;</span><br><span class="line">    <span class="keyword">if</span> (<span class="regexp">/Android|webOS|BlackBerry/i</span>.<span class="title function_">test</span>(navigator.<span class="property">userAgent</span>)) <span class="keyword">return</span> <span class="literal">true</span>; <span class="comment">//媒体选择</span></span><br><span class="line">    <span class="keyword">if</span> (button.<span class="property">clicked</span>) <span class="keyword">return</span></span><br><span class="line">    button.<span class="property">classList</span>.<span class="title function_">add</span>(<span class="string">&#x27;clicked&#x27;</span>)</span><br><span class="line"></span><br><span class="line">    <span class="comment">// Wait to start flipping th coin because of the button tilt animation</span></span><br><span class="line">    <span class="built_in">setTimeout</span>(<span class="function">() =&gt;</span> &#123;</span><br><span class="line">      <span class="comment">// Randomize the flipping speeds just for fun</span></span><br><span class="line">      coin.<span class="property">sideRotationCount</span> = <span class="title class_">Math</span>.<span class="title function_">floor</span>(<span class="title class_">Math</span>.<span class="title function_">random</span>() * <span class="number">5</span>) * <span class="number">90</span></span><br><span class="line">      coin.<span class="property">maxFlipAngle</span> = (<span class="title class_">Math</span>.<span class="title function_">floor</span>(<span class="title class_">Math</span>.<span class="title function_">random</span>() * <span class="number">4</span>) + <span class="number">3</span>) * <span class="title class_">Math</span>.<span class="property">PI</span></span><br><span class="line">      button.<span class="property">clicked</span> = <span class="literal">true</span></span><br><span class="line">      <span class="title function_">flipCoin</span>()</span><br><span class="line">      <span class="title function_">coinAudio</span>()</span><br><span class="line">    &#125;, <span class="number">50</span>)</span><br><span class="line">  &#125;)</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> <span class="title function_">flipCoin</span> = (<span class="params"></span>) =&gt; &#123;</span><br><span class="line">    coin.<span class="property">moveLoopCount</span> = <span class="number">0</span></span><br><span class="line">    <span class="title function_">flipCoinLoop</span>()</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> <span class="title function_">resetCoin</span> = (<span class="params"></span>) =&gt; &#123;</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--coin-x-multiplier&#x27;</span>, <span class="number">0</span>)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--coin-scale-multiplier&#x27;</span>, <span class="number">0</span>)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--coin-rotation-multiplier&#x27;</span>, <span class="number">0</span>)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--shine-opacity-multiplier&#x27;</span>, <span class="number">0.4</span>)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--shine-bg-multiplier&#x27;</span>, <span class="string">&#x27;50%&#x27;</span>)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;opacity&#x27;</span>, <span class="number">1</span>)</span><br><span class="line">    <span class="comment">// Delay to give the reset animation some time before you can click again</span></span><br><span class="line">    <span class="built_in">setTimeout</span>(<span class="function">() =&gt;</span> &#123;</span><br><span class="line">      button.<span class="property">clicked</span> = <span class="literal">false</span></span><br><span class="line">    &#125;, <span class="number">300</span>)</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> <span class="title function_">flipCoinLoop</span> = (<span class="params"></span>) =&gt; &#123;</span><br><span class="line">    coin.<span class="property">moveLoopCount</span>++</span><br><span class="line">    <span class="keyword">var</span> percentageCompleted = coin.<span class="property">moveLoopCount</span> / coin.<span class="property">maxMoveLoopCount</span></span><br><span class="line">    coin.<span class="property">angle</span> = -coin.<span class="property">maxFlipAngle</span> * <span class="title class_">Math</span>.<span class="title function_">pow</span>((percentageCompleted - <span class="number">1</span>), <span class="number">2</span>) + coin.<span class="property">maxFlipAngle</span></span><br><span class="line"></span><br><span class="line">    <span class="comment">// Calculate the scale and position of the coin moving through the air</span></span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--coin-y-multiplier&#x27;</span>, -<span class="number">11</span> * <span class="title class_">Math</span>.<span class="title function_">pow</span>(percentageCompleted * <span class="number">2</span> - <span class="number">1</span>, <span class="number">4</span>) + <span class="number">11</span>)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--coin-x-multiplier&#x27;</span>, percentageCompleted)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--coin-scale-multiplier&#x27;</span>, percentageCompleted * <span class="number">0.6</span>)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--coin-rotation-multiplier&#x27;</span>, percentageCompleted * coin.<span class="property">sideRotationCount</span>)</span><br><span class="line"></span><br><span class="line">    <span class="comment">// Calculate the scale and position values for the different coin faces</span></span><br><span class="line">    <span class="comment">// The math uses sin/cos wave functions to similate the circular motion of 3D spin</span></span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--front-scale-multiplier&#x27;</span>, <span class="title class_">Math</span>.<span class="title function_">max</span>(<span class="title class_">Math</span>.<span class="title function_">cos</span>(coin.<span class="property">angle</span>), <span class="number">0</span>))</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--front-y-multiplier&#x27;</span>, <span class="title class_">Math</span>.<span class="title function_">sin</span>(coin.<span class="property">angle</span>))</span><br><span class="line"></span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--middle-scale-multiplier&#x27;</span>, <span class="title class_">Math</span>.<span class="title function_">abs</span>(<span class="title class_">Math</span>.<span class="title function_">cos</span>(coin.<span class="property">angle</span>), <span class="number">0</span>))</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--middle-y-multiplier&#x27;</span>, <span class="title class_">Math</span>.<span class="title function_">cos</span>((coin.<span class="property">angle</span> + <span class="title class_">Math</span>.<span class="property">PI</span> / <span class="number">2</span>) % <span class="title class_">Math</span>.<span class="property">PI</span>))</span><br><span class="line"></span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--back-scale-multiplier&#x27;</span>, <span class="title class_">Math</span>.<span class="title function_">max</span>(<span class="title class_">Math</span>.<span class="title function_">cos</span>(coin.<span class="property">angle</span> - <span class="title class_">Math</span>.<span class="property">PI</span>), <span class="number">0</span>))</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--back-y-multiplier&#x27;</span>, <span class="title class_">Math</span>.<span class="title function_">sin</span>(coin.<span class="property">angle</span> - <span class="title class_">Math</span>.<span class="property">PI</span>))</span><br><span class="line"></span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--shine-opacity-multiplier&#x27;</span>, <span class="number">4</span> * <span class="title class_">Math</span>.<span class="title function_">sin</span>((coin.<span class="property">angle</span> + <span class="title class_">Math</span>.<span class="property">PI</span> / <span class="number">2</span>) % <span class="title class_">Math</span>.<span class="property">PI</span>) - <span class="number">3.2</span>)</span><br><span class="line">    coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;--shine-bg-multiplier&#x27;</span>, -<span class="number">40</span> * (<span class="title class_">Math</span>.<span class="title function_">cos</span>((coin.<span class="property">angle</span> + <span class="title class_">Math</span>.<span class="property">PI</span> / <span class="number">2</span>) % <span class="title class_">Math</span>.<span class="property">PI</span>) - <span class="number">0.5</span>) + <span class="string">&#x27;%&#x27;</span>)</span><br><span class="line"></span><br><span class="line">    <span class="comment">// Repeat animation loop</span></span><br><span class="line">    <span class="keyword">if</span> (coin.<span class="property">moveLoopCount</span> &lt; coin.<span class="property">maxMoveLoopCount</span>) &#123;</span><br><span class="line">      <span class="keyword">if</span> (coin.<span class="property">moveLoopCount</span> === coin.<span class="property">maxMoveLoopCount</span> - <span class="number">6</span>) button.<span class="property">classList</span>.<span class="title function_">add</span>(<span class="string">&#x27;shrink-landing&#x27;</span>)</span><br><span class="line">      <span class="variable language_">window</span>.<span class="title function_">requestAnimationFrame</span>(flipCoinLoop)</span><br><span class="line">    &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">      button.<span class="property">classList</span>.<span class="title function_">add</span>(<span class="string">&#x27;coin-landed&#x27;</span>)</span><br><span class="line">      coin.<span class="property">style</span>.<span class="title function_">setProperty</span>(<span class="string">&#x27;opacity&#x27;</span>, <span class="number">0</span>)</span><br><span class="line">      <span class="built_in">setTimeout</span>(<span class="function">() =&gt;</span> &#123;</span><br><span class="line">        button.<span class="property">classList</span>.<span class="title function_">remove</span>(<span class="string">&#x27;clicked&#x27;</span>, <span class="string">&#x27;shrink-landing&#x27;</span>, <span class="string">&#x27;coin-landed&#x27;</span>)</span><br><span class="line">        <span class="built_in">setTimeout</span>(<span class="function">() =&gt;</span> &#123;</span><br><span class="line">          <span class="title function_">resetCoin</span>()</span><br><span class="line">        &#125;, <span class="number">300</span>)</span><br><span class="line">      &#125;, <span class="number">1500</span>)</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;)</span><br></pre></td></tr></table></figure></li><li>修改<code>_config.butterfly.yml</code>,添加音频文件配置项，添加CDN配置项：<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">  # Sponsor/reward</span><br><span class="line">  reward:</span><br><span class="line">    enable: true</span><br><span class="line"><span class="addition">+   coinAudio: https://npm.elemecdn.com/akilar-candyassets@1.0.16/audio/coin.mp3</span></span><br><span class="line">    QR_code:</span><br><span class="line">    。</span><br><span class="line">    。</span><br><span class="line">    。</span><br><span class="line">  CDN:</span><br><span class="line">    # main</span><br><span class="line">    main_css: /css/index.css</span><br><span class="line">    jquery: https://npm.elemecdn.com/jquery@latest/dist/jquery.min.js</span><br><span class="line">    main: /js/main.js</span><br><span class="line">    utils:/js/utils.js</span><br><span class="line"><span class="addition">+    # 打赏按钮投币效果</span></span><br><span class="line"><span class="addition">+   coin_js: /js/coin.js</span></span><br><span class="line"><span class="addition">+   coin_css: /css/coin.css</span></span><br></pre></td></tr></table></figure></li><li>现在的打赏按钮样式需要稍作适配，当前若提示语太长，悬停时会无法显示完全。需要微调一下,修改<code>[Blogroot]\themes\butterfly\source\css\_layout\reward.styl</code>，整体替换为以下内容：<figure class="highlight stylus"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-class">.post-reward</span></span><br><span class="line">  <span class="attribute">position</span>: relative</span><br><span class="line">  <span class="attribute">margin-top</span>: <span class="number">4rem</span></span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span></span><br><span class="line">  <span class="attribute">text-align</span>: center</span><br><span class="line"></span><br><span class="line">  <span class="selector-class">.reward-button</span></span><br><span class="line">    <span class="attribute">display</span>: inline-block</span><br><span class="line">    <span class="attribute">padding</span>: .<span class="number">2rem</span> <span class="number">1.2rem</span></span><br><span class="line">    <span class="attribute">background</span>: <span class="built_in">var</span>(--btn-bg)</span><br><span class="line">    <span class="attribute">color</span>: <span class="built_in">var</span>(--btn-color)</span><br><span class="line">    <span class="attribute">cursor</span>: pointer</span><br><span class="line">    <span class="attribute">transition</span>: all .<span class="number">4s</span></span><br><span class="line"></span><br><span class="line">    <span class="selector-pseudo">&amp;:hover</span></span><br><span class="line">      <span class="attribute">box-shadow</span>: inset <span class="number">15em</span> <span class="number">0</span> <span class="number">0</span> <span class="number">0</span> <span class="built_in">var</span>(--btn-hover-color)</span><br><span class="line"></span><br><span class="line">      <span class="selector-class">.reward-main</span></span><br><span class="line">        <span class="attribute">display</span>: block</span><br><span class="line"></span><br><span class="line">    <span class="selector-class">.reward-main</span></span><br><span class="line">      <span class="attribute">position</span>: absolute</span><br><span class="line">      <span class="attribute">bottom</span>: <span class="number">40px</span></span><br><span class="line">      <span class="attribute">left</span>: -<span class="number">25%</span></span><br><span class="line">      <span class="attribute">z-index</span>: <span class="number">100</span></span><br><span class="line">      <span class="attribute">display</span>: none</span><br><span class="line">      <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">0</span> <span class="number">15px</span></span><br><span class="line">      <span class="attribute">width</span>: <span class="number">150%</span></span><br><span class="line"></span><br><span class="line">      <span class="selector-class">.reward-all</span></span><br><span class="line">        <span class="attribute">display</span>: inline-block</span><br><span class="line">        <span class="attribute">margin</span>: <span class="number">0</span></span><br><span class="line">        <span class="attribute">padding</span>: <span class="number">1rem</span> .<span class="number">5rem</span></span><br><span class="line">        <span class="attribute">border-radius</span>: <span class="number">4px</span></span><br><span class="line">        <span class="attribute">background</span>: <span class="built_in">var</span>(--reward-pop)</span><br><span class="line"></span><br><span class="line">        <span class="selector-pseudo">&amp;:before</span></span><br><span class="line">          <span class="attribute">position</span>: absolute</span><br><span class="line">          <span class="attribute">bottom</span>: -<span class="number">10px</span></span><br><span class="line">          <span class="attribute">left</span>: <span class="number">0</span></span><br><span class="line">          <span class="attribute">width</span>: <span class="number">100%</span></span><br><span class="line">          <span class="attribute">height</span>: <span class="number">20px</span></span><br><span class="line">          <span class="attribute">content</span>: <span class="string">&#x27;&#x27;</span></span><br><span class="line"></span><br><span class="line">        <span class="selector-pseudo">&amp;:after</span></span><br><span class="line">          <span class="attribute">position</span>: absolute</span><br><span class="line">          <span class="attribute">right</span>: <span class="number">0</span></span><br><span class="line">          <span class="attribute">bottom</span>: <span class="number">2px</span></span><br><span class="line">          <span class="attribute">left</span>: <span class="number">0</span></span><br><span class="line">          <span class="attribute">margin</span>: <span class="number">0</span> auto</span><br><span class="line">          <span class="attribute">width</span>: <span class="number">0</span></span><br><span class="line">          <span class="attribute">height</span>: <span class="number">0</span></span><br><span class="line">          <span class="attribute">border-top</span>: <span class="number">13px</span> solid <span class="built_in">var</span>(--reward-pop)</span><br><span class="line">          <span class="attribute">border-right</span>: <span class="number">13px</span> solid transparent</span><br><span class="line">          <span class="attribute">border-left</span>: <span class="number">13px</span> solid transparent</span><br><span class="line">          <span class="attribute">content</span>: <span class="string">&#x27;&#x27;</span></span><br><span class="line"></span><br><span class="line">        <span class="selector-class">.reward-item</span></span><br><span class="line">          <span class="attribute">display</span>: inline-block</span><br><span class="line">          <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">8px</span></span><br><span class="line">          <span class="attribute">list-style-type</span>: none</span><br><span class="line">          <span class="attribute">vertical-align</span>: top</span><br><span class="line"></span><br><span class="line">          <span class="selector-tag">img</span></span><br><span class="line">            <span class="attribute">width</span>: <span class="number">130px</span></span><br><span class="line">            <span class="attribute">height</span>: <span class="number">130px</span></span><br><span class="line"></span><br><span class="line">          <span class="selector-class">.post-qr-code-desc</span></span><br><span class="line">            <span class="attribute">padding-top</span>: .<span class="number">4rem</span></span><br><span class="line">            <span class="attribute">width</span>: <span class="number">130px</span></span><br><span class="line">            <span class="attribute">color</span>: <span class="variable">$reward</span>-pop-up-color</span><br></pre></td></tr></table></figure>还可以针对自己的情况适度调整以下内容：<ul><li>修改悬停打赏按钮时的颜色填充长度：<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">  .reward-button</span><br><span class="line">    display: inline-block</span><br><span class="line">    padding: .2rem 1.2rem</span><br><span class="line">    background: var(--btn-bg)</span><br><span class="line">    color: var(--btn-color)</span><br><span class="line">    cursor: pointer</span><br><span class="line">    transition: all .4s</span><br><span class="line"></span><br><span class="line">    &amp;:hover</span><br><span class="line"><span class="deletion">-     box-shadow: inset 9em 0 0 0 var(--btn-hover-color)</span></span><br><span class="line"><span class="addition">+     box-shadow: inset 20em 0 0 0 var(--btn-hover-color)</span></span><br></pre></td></tr></table></figure></li><li>修改打赏二维码的样式（仅针对2张二维码的情况，单张不用改动。两张以上需要自己调试这两个参数）<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">  .reward-main</span><br><span class="line">    position: absolute</span><br><span class="line">    bottom: 40px</span><br><span class="line"><span class="deletion">-   left: 0</span></span><br><span class="line"><span class="addition">+   left: -25%</span></span><br><span class="line">    z-index: 100</span><br><span class="line">    display: none</span><br><span class="line">    padding: 0 0 15px</span><br><span class="line"><span class="deletion">-   width: 100%</span></span><br><span class="line"><span class="addition">+   width: 150%</span></span><br></pre></td></tr></table></figure></li></ul></li></ol><button type="button" class="tab-to-top" aria-label="scroll to top"><i class="fas fa-arrow-up"></i></button></div></div></div><h2 id="页脚振翅蝴蝶动效"><a href="#页脚振翅蝴蝶动效" class="headerlink" title="页脚振翅蝴蝶动效"></a>页脚振翅蝴蝶动效</h2><details class="folding-tag" cyan><summary>点击查看页脚振翅蝴蝶动效魔改教程</summary><div class="content"><p></p><div class="note info flat"><p>本站页脚的振翅蝴蝶使用了<code>iconfont</code>的<code>symbol</code>引入方案，引入了彩色蝴蝶图标。因此使用本改动需要先学习前置教程： <a href="/posts/d2ebecef/">Hexo引入阿里矢量图标库</a>。</p></div><p></p><ol><li>引入相应的图标资源，修改<code>_config.butterfly.yml</code>，在<code>inject</code>配置项添加图标库js。此处为我的图标库链接，掌握前置教程后可以改成自己的。<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">inject:</span></span><br><span class="line">  <span class="attr">head:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">&lt;link</span> <span class="string">rel=&quot;stylesheet&quot;</span> <span class="string">href=&quot;/css/custom.css&quot;</span>  <span class="string">media=&quot;defer&quot;</span> <span class="string">onload=&quot;this.media=&#x27;all&#x27;&quot;&gt;</span> <span class="comment">#教学用样式</span></span><br><span class="line">  <span class="attr">bottom:</span></span><br><span class="line">    <span class="comment"># 阿里矢量图标</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">&lt;script</span> <span class="string">async</span> <span class="string">src=&quot;//at.alicdn.com/t/font_2032782_8ns648avijk.js&quot;&gt;&lt;/script&gt;</span></span><br></pre></td></tr></table></figure></li><li>新建<code>[Blogroot]\themes\butterfly\source\css\custom.css</code>,在里面添加图标默认样式和振翅蝴蝶动画。<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/*iconfont默认样式*/</span></span><br><span class="line"><span class="selector-class">.icon</span> &#123;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">1em</span>; <span class="attribute">height</span>: <span class="number">1em</span>;</span><br><span class="line">  <span class="attribute">vertical-align</span>: -<span class="number">0.15em</span>;</span><br><span class="line">  fill: currentColor;</span><br><span class="line">  <span class="attribute">overflow</span>: hidden;</span><br><span class="line">  &#125;</span><br><span class="line"><span class="comment">/* 页脚蝴蝶振翅动画 */</span></span><br><span class="line"><span class="selector-class">.copyright</span> svg&#123;</span><br><span class="line">  <span class="attribute">animation</span>:butterfly <span class="number">1s</span> linear infinite alternate;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">@keyframes</span> butterfly &#123;</span><br><span class="line">  <span class="selector-tag">from</span> &#123;</span><br><span class="line">    <span class="attribute">transform</span>:<span class="built_in">rotateY</span>(<span class="number">70deg</span>);</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="selector-tag">to</span> &#123;</span><br><span class="line">    <span class="attribute">transform</span>:<span class="built_in">rotateY</span>(<span class="number">0deg</span>);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></li><li>修改<code>[Blogroot]\themes\butterfly\layout\includes\footer.pug</code>,<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line">  #footer-wrap</span><br><span class="line">    if theme.footer.owner.enable</span><br><span class="line">      - var now = new Date()</span><br><span class="line">      - var nowYear = now.getFullYear()</span><br><span class="line"><span class="deletion">-     if theme.footer.owner.since &amp;&amp; theme.footer.owner.since != nowYear</span></span><br><span class="line"><span class="deletion">-       .copyright!= `&amp;copy;$&#123;theme.footer.owner.since&#125; - $&#123;nowYear&#125; By $&#123;config.author&#125;`</span></span><br><span class="line"><span class="deletion">-     else</span></span><br><span class="line"><span class="deletion">-       .copyright!= `&amp;copy;$&#123;nowYear&#125; By $&#123;config.author&#125;`</span></span><br><span class="line"><span class="addition">+     if theme.footer.owner.since &amp;&amp; theme.footer.owner.since != nowYear</span></span><br><span class="line"><span class="addition">+       .copyright</span></span><br><span class="line"><span class="addition">+           span!= `&amp;copy;$&#123;theme.footer.owner.since&#125; - $&#123;nowYear&#125;`</span></span><br><span class="line"><span class="addition">+           svg(style=&quot;width:1.5em; height:1.5em&quot; aria-hidden=&quot;true&quot;)</span></span><br><span class="line"><span class="addition">+             use(xlink:href=&quot;#icon-Butterfly&quot;)</span></span><br><span class="line"><span class="addition">+           span!= `$&#123;config.author&#125;`</span></span><br><span class="line"><span class="addition">+     else</span></span><br><span class="line"><span class="addition">+       .copyright</span></span><br><span class="line"><span class="addition">+         span!= `&amp;copy;$&#123;nowYear&#125;`</span></span><br><span class="line"><span class="addition">+         svg(style=&quot;width:1.5em; height:1.5em&quot; aria-hidden=&quot;true&quot;)</span></span><br><span class="line"><span class="addition">+           use(xlink:href=&quot;#icon-Butterfly&quot;)</span></span><br><span class="line"><span class="addition">+         span!= `$&#123;config.author&#125;`</span></span><br></pre></td></tr></table></figure></li><li>事实上直接用<code>emoji</code>的🦋，配合<code>fontawesome-animation</code>也能做到类似效果，甚至还可以使用<code>base64</code>的图片，但是图标呈现的不论是色彩还是动效都不如用<code>iconfont</code>来的漂亮。这里的动画用到了<code>rotateY</code>,三维上其实是图标在绕着Y轴旋转，降维到二维以后就呈现出了对折振翅的效果，但是人脑是很神奇的，因为左右半脑的发达程度不均，有的人还是能看到蝴蝶其实是在旋转而不是振翅。当然也不乏切换自如的人才。这个就只能仁者见仁智者见智了。</li></ol></div></details><h2 id="封面节日挂件效果"><a href="#封面节日挂件效果" class="headerlink" title="封面节日挂件效果"></a>封面节日挂件效果</h2><details class="folding-tag" red><summary>点击查看封面节日挂件效果魔改</summary><div class="content"><p></p><div class="note info flat"><p>本站封面节日挂件效果使用了<code>iconfont</code>的<code>symbol</code>引入方案，引入了彩色节日图标。因此使用本改动需要先学习前置教程： <a href="/posts/d2ebecef/">Hexo引入阿里矢量图标库</a>。</p></div><p></p><ol><li>新建<code>[Blogroot]\themes\butterfly\scripts\festival.js</code>，<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">hexo.<span class="property">extend</span>.<span class="property">helper</span>.<span class="title function_">register</span>(<span class="string">&#x27;getFestivalIcon&#x27;</span>, <span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">    <span class="keyword">var</span> icon = [</span><br><span class="line">        <span class="string">&#x27;#icon-qiandai&#x27;</span>,</span><br><span class="line">        <span class="string">&#x27;#icon-denglong&#x27;</span>,</span><br><span class="line">        <span class="string">&#x27;#icon-juanzhou&#x27;</span>,</span><br><span class="line">        <span class="string">&#x27;#icon-hongbao&#x27;</span>,</span><br><span class="line">        <span class="string">&#x27;#icon-duilian&#x27;</span>,</span><br><span class="line">        <span class="string">&#x27;#icon-bianpao&#x27;</span>,</span><br><span class="line">        <span class="string">&#x27;#icon-shanzi&#x27;</span>,</span><br><span class="line">        <span class="string">&#x27;#icon-tangguo&#x27;</span>,</span><br><span class="line">        <span class="string">&#x27;#icon-yuanbao&#x27;</span>,</span><br><span class="line">        <span class="string">&#x27;#icon-qianchuan&#x27;</span>,</span><br><span class="line">        <span class="string">&#x27;#icon-denglong2&#x27;</span></span><br><span class="line">    ]</span><br><span class="line">    <span class="keyword">var</span> index = <span class="title class_">Math</span>.<span class="title function_">floor</span>(<span class="title class_">Math</span>.<span class="title function_">random</span>()*icon.<span class="property">length</span>);</span><br><span class="line">    <span class="keyword">return</span> icon[index]</span><br><span class="line">&#125;);</span><br></pre></td></tr></table></figure></li><li>修改<code>[Blogroot]\themes\butterfly\layout\includes\mixins\post-ui.pug</code>,<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">  if post_cover &amp;&amp; theme.cover.index_enable</span><br><span class="line">    .post_cover(class=leftOrRight)</span><br><span class="line">      a(href=url_for(link) title=title)</span><br><span class="line"><span class="addition">+       svg.icon.festival-decoration(aria-hidden=&quot;true&quot;)</span></span><br><span class="line"><span class="addition">+         use(xlink:href=getFestivalIcon())    </span></span><br><span class="line">        if theme.lazyload.enable</span><br><span class="line">          img.post_bg(data-lazy-src=url_for(post_cover) onerror=`this.onerror=null;this.src=&#x27;`+ url_for(theme.error_img.post_page) + `&#x27;` alt=title)</span><br><span class="line">        else</span><br><span class="line">          img.post_bg(src=url_for(post_cover) onerror=`this.onerror=null;this.src=&#x27;`+ url_for(theme.error_img.post_page) + `&#x27;` alt=title)</span><br></pre></td></tr></table></figure></li><li>新建<code>[Blogroot]\themes\butterfly\source\css\custom.css</code>,<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br></pre></td><td class="code"><pre><span class="line">svg<span class="selector-class">.icon</span><span class="selector-class">.festival-decoration</span> &#123;</span><br><span class="line">    <span class="attribute">width</span>: <span class="number">3em</span>;</span><br><span class="line">    <span class="attribute">height</span>: <span class="number">3em</span>;</span><br><span class="line">    <span class="attribute">left</span>: <span class="number">2em</span>;</span><br><span class="line">    <span class="attribute">margin-bottom</span>: -<span class="number">3em</span>;</span><br><span class="line">    <span class="attribute">display</span>: block;</span><br><span class="line">    <span class="attribute">z-index</span>: <span class="number">100</span>;</span><br><span class="line">    <span class="attribute">position</span>: relative;</span><br><span class="line">    -webkit-<span class="attribute">animation</span>: sway <span class="number">1s</span> infinite ease-in-out alternate;</span><br><span class="line">    <span class="attribute">animation</span>: sway <span class="number">1s</span> infinite ease-in-out alternate;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">@-webkit-keyframes</span> sway &#123;</span><br><span class="line">  <span class="number">0%</span> &#123;</span><br><span class="line">    -webkit-<span class="attribute">transform</span>: <span class="built_in">rotate</span>(<span class="number">20deg</span>);</span><br><span class="line">    <span class="attribute">transform-origin</span>: center top;</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="number">100%</span> &#123;</span><br><span class="line">    -webkit-<span class="attribute">transform</span>: <span class="built_in">rotate</span>(-<span class="number">20deg</span>);</span><br><span class="line">    <span class="attribute">transform-origin</span>: center top;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">@keyframes</span> sway &#123;</span><br><span class="line">  <span class="number">0%</span> &#123;</span><br><span class="line">    <span class="attribute">transform</span>: <span class="built_in">rotate</span>(<span class="number">20deg</span>);</span><br><span class="line">    <span class="attribute">transform-origin</span>: center top;</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="number">100%</span> &#123;</span><br><span class="line">    <span class="attribute">transform</span>: <span class="built_in">rotate</span>(-<span class="number">20deg</span>);</span><br><span class="line">    <span class="attribute">transform-origin</span>: center top;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></li><li>修改<code>_config.butterfly.yml</code>的<code>inject</code>配置项，引入<code>custom.css</code>和<code>iconfont</code>的<code>js</code>，此处为我的图标库链接，熟练掌握前置教程后可以换成自己的:<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"># 插入代码到头部 &lt;/head&gt; 之前 和 底部 &lt;/body&gt; 之前</span><br><span class="line">inject:</span><br><span class="line">  head:</span><br><span class="line">    - &lt;link rel=&quot;stylesheet&quot; href=&quot;/css/custom.css&quot;  media=&quot;defer&quot; onload=&quot;this.media=&#x27;all&#x27;&quot;&gt; #教学用样式</span><br><span class="line">  bottom:</span><br><span class="line">    # 阿里矢量图标</span><br><span class="line">    - &lt;script async src=&quot;//at.alicdn.com/t/font_2032782_ev6ytrh30f.js&quot;&gt;&lt;/script&gt;</span><br></pre></td></tr></table></figure></li></ol></div></details><h2 id="每页单独配置背景图"><a href="#每页单独配置背景图" class="headerlink" title="每页单独配置背景图"></a>每页单独配置背景图</h2><details class="folding-tag" red><summary>点击查看每页单独配置背景图教程</summary><div class="content"><div class="note info flat"><p><code>Butterfly</code>使用<code>id</code>为<code>web_bg</code>的<code>div</code>(以下简称<code>#web_bg</code>)来挂载背景图片，而背景图片是使用的<code>#web_bg</code>的<code>background</code>属性来配置,所以只需要改动这个css属性就可以。例如直接在md页面加入这样一条自定义样式：</p><figure class="highlight django"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="template-tag">&#123;% <span class="name">raw</span> %&#125;</span><span class="language-xml"></span></span><br><span class="line"><span class="language-xml"><span class="tag">&lt;<span class="name">style</span>&gt;</span><span class="language-css"></span></span></span><br><span class="line"><span class="language-css"><span class="language-xml"><span class="selector-id">#web_bg</span>&#123;</span></span></span><br><span class="line"><span class="language-css"><span class="language-xml">  <span class="attribute">background</span>: <span class="built_in">url</span>(<span class="string">/img/newbg.png</span>)<span class="meta">!important</span>;</span></span></span><br><span class="line"><span class="language-css"><span class="language-xml">  <span class="comment">/*重新定义background会导致原有定位属性失效，所以也需要再声明一次加权的定位属性*/</span></span></span></span><br><span class="line"><span class="language-css"><span class="language-xml">  <span class="attribute">background-position</span>: center <span class="meta">!important</span>;</span></span></span><br><span class="line"><span class="language-css"><span class="language-xml">  <span class="attribute">background-size</span>: cover <span class="meta">!important</span>;</span></span></span><br><span class="line"><span class="language-css"><span class="language-xml">  <span class="attribute">background-repeat</span>: no-repeat <span class="meta">!important</span>;</span></span></span><br><span class="line"><span class="language-css"><span class="language-xml">&#125;</span></span></span><br><span class="line"><span class="language-css"><span class="language-xml"></span><span class="tag">&lt;/<span class="name">style</span>&gt;</span></span></span><br><span class="line"><span class="language-xml"></span><span class="template-tag">&#123;% <span class="name">endraw</span> %&#125;</span></span><br></pre></td></tr></table></figure><p>而更好的方案自然是在<code>front-matter</code>中通过新增一个<code>background</code>配置项来配置页面背景。基于这一思路，我们可以考虑在内联样式中添加参数。因为内联样式的权重本来就比外链高，所以不需要再在内联样式中加<code>!important</code>来提高权重了。</p></div><ol><li>修改<code>[Blogroot]\themes\butterfly\layout\includes\layout.pug</code>,<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">  if theme.background</span><br><span class="line"><span class="deletion">-   #web_bg</span></span><br><span class="line"><span class="addition">+   if page.background</span></span><br><span class="line"><span class="addition">+     #web_bg(style=`background:`+ page.background + `;background-attachment: local;background-position: center;background-size: cover;background-repeat: no-repeat;`)</span></span><br><span class="line"><span class="addition">+   else</span></span><br><span class="line"><span class="addition">+     #web_bg</span></span><br></pre></td></tr></table></figure></li><li>如此即可在每个页面的<code>markdown</code>文件的<code>front-matter</code>中使用<code>background</code>配置项单独配置页面背景了,不写或留空则使用主题配置文件中的默认背景。<figure class="highlight markdown"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line">title: 糖果屋微调合集</span><br><span class="line">top<span class="emphasis">_img:</span></span><br><span class="line"><span class="emphasis">cover: &#x27;https://npm.elemecdn.com/akilar-candyassets/image/20201115152231.png&#x27;</span></span><br><span class="line"><span class="emphasis">background: url(https://npm.elemecdn.com/akilar-candyassets/image/index.webp)</span></span><br><span class="line"><span class="emphasis">description: 将本站针对butterfly主题的亿点点小改动做个集锦。</span></span><br><span class="line"><span class="emphasis">---</span></span><br></pre></td></tr></table></figure></li><li>感谢@<a target="_blank" rel="noopener external nofollow noreferrer" href="https://toxics1udge.github.io/">Toxic</a>的反馈，开了pjax的用户会发现背景变了以后就变不回去了，需要刷新才行。因此为了实现期望的效果，这里还要再把<code>#web_bg</code>加到<code>pjax</code>选择器中。<br>修改<code>[Blogroot]\themes\butterfly\layout\includes\third-party\pjax.pug</code>,<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">  script(src=url_for(theme.CDN.pjax))</span><br><span class="line">  script.</span><br><span class="line">    let pjaxSelectors = [</span><br><span class="line">      &#x27;title&#x27;,</span><br><span class="line">      &#x27;#config-diff&#x27;,</span><br><span class="line">      &#x27;#body-wrap&#x27;,</span><br><span class="line">      &#x27;#rightside-config-hide&#x27;,</span><br><span class="line">      &#x27;#rightside-config-show&#x27;,</span><br><span class="line"><span class="addition">+     &#x27;#web_bg&#x27;,</span></span><br><span class="line">      &#x27;.js-pjax&#x27;</span><br><span class="line">    ]</span><br></pre></td></tr></table></figure></li></ol></div></details><h2 id="配置手机PC页面白天黑夜共四个背景图"><a href="#配置手机PC页面白天黑夜共四个背景图" class="headerlink" title="配置手机PC页面白天黑夜共四个背景图"></a>配置手机PC页面白天黑夜共四个背景图</h2><details class="folding-tag" red><summary>点击查看配置手机PC页面白天黑夜共四个背景图教程</summary><div class="content"><p></p><div class="note warning flat"><p>因为本改法同样是使用<code>!important</code>提高权重的方式来改变当前页面背景。所以会和上方的每页单独配置背景图存在一定冲突，具体表现为定义了单页背景的页面不会再应用默认的四个页面。建议两个方案二选一。(本帖没有给出两种方案的融合写法，因为真的非常不推荐您这么做)</p></div><p></p><ol><li>首先是PC端的白天黑夜双背景，修改<code>[Blogroot]\themes\butterfly\layout\includes\layout.pug</code>,<div class="tabs" id="webbg"><ul class="nav-tabs"><li class="tab"><button type="button" data-href="#webbg-1">diff代码块</button></li><li class="tab"><button type="button" data-href="#webbg-2">改完后内容</button></li></ul><div class="tab-contents"><div class="tab-item-content" id="webbg-1"><figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre></td><td class="code"><pre><span class="line"><span class="addition">+ - var DefaultBg = page.defaultbg ? page.defaultbg : theme.background.default</span></span><br><span class="line"><span class="addition">+ - var DDMBg = theme.background.darkmode ? theme.background.darkmode : DefaultBg</span></span><br><span class="line"><span class="addition">+ - var DarkmodeBg = page.darkmodebg ? page.darkmodebg : DDMBg</span></span><br><span class="line">  if theme.background</span><br><span class="line">    #web_bg</span><br><span class="line"><span class="addition">+     if page.defaultbg || page.darkmodebg</span></span><br><span class="line"><span class="addition">+       style.</span></span><br><span class="line"><span class="addition">+         #web_bg&#123;</span></span><br><span class="line"><span class="addition">+           background: #&#123;DefaultBg&#125; !important;</span></span><br><span class="line"><span class="addition">+           background-attachment: local!important;</span></span><br><span class="line"><span class="addition">+           background-position: center!important;</span></span><br><span class="line"><span class="addition">+           background-size: cover!important;</span></span><br><span class="line"><span class="addition">+           background-repeat: no-repeat!important;</span></span><br><span class="line"><span class="addition">+         &#125;</span></span><br><span class="line"><span class="addition">+         [data-theme=&quot;dark&quot;]</span></span><br><span class="line"><span class="addition">+           #web_bg&#123;</span></span><br><span class="line"><span class="addition">+             background: #&#123;DarkmodeBg&#125; !important;</span></span><br><span class="line"><span class="addition">+             background-attachment: local!important;</span></span><br><span class="line"><span class="addition">+             background-position: center!important;</span></span><br><span class="line"><span class="addition">+             background-size: cover!important;</span></span><br><span class="line"><span class="addition">+             background-repeat: no-repeat!important;</span></span><br><span class="line"><span class="addition">+           &#125;</span></span><br></pre></td></tr></table></figure><button type="button" class="tab-to-top" aria-label="scroll to top"><i class="fas fa-arrow-up"></i></button></div><div class="tab-item-content" id="webbg-2"><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre></td><td class="code"><pre><span class="line">- var DefaultBg = page.defaultbg ? page.defaultbg : theme.background.default</span><br><span class="line">- var DDMBg = theme.background.darkmode ? theme.background.darkmode : DefaultBg</span><br><span class="line">- var DarkmodeBg = page.darkmodebg ? page.darkmodebg : DDMBg</span><br><span class="line">if theme.background</span><br><span class="line">  #web_bg</span><br><span class="line">    if page.defaultbg || page.darkmodebg</span><br><span class="line">      style.</span><br><span class="line">        #web_bg&#123;</span><br><span class="line">          background: #&#123;DefaultBg&#125; !important;</span><br><span class="line">          background-attachment: local!important;</span><br><span class="line">          background-position: center!important;</span><br><span class="line">          background-size: cover!important;</span><br><span class="line">          background-repeat: no-repeat!important;</span><br><span class="line">        &#125;</span><br><span class="line">        [data-theme=&quot;dark&quot;]</span><br><span class="line">          #web_bg&#123;</span><br><span class="line">            background: #&#123;DarkmodeBg&#125; !important;</span><br><span class="line">            background-attachment: local!important;</span><br><span class="line">            background-position: center!important;</span><br><span class="line">            background-size: cover!important;</span><br><span class="line">            background-repeat: no-repeat!important;</span><br><span class="line">          &#125;</span><br></pre></td></tr></table></figure><button type="button" class="tab-to-top" aria-label="scroll to top"><i class="fas fa-arrow-up"></i></button></div></div></div></li><li>再是实现手机端的白天黑夜双背景，在<code>[Blogroot]\themes\butterfly\source\css\_layout</code>目录下新建一个<code>web-bg.styl</code>文件，写入以下内容：<figure class="highlight stylus"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><span class="line"><span class="variable">$web</span>-bg-night = <span class="built_in">hexo-config</span>(<span class="string">&#x27;background.darkmode&#x27;</span>) ? <span class="built_in">unquote</span>(<span class="built_in">hexo-config</span>(<span class="string">&#x27;background.darkmode&#x27;</span>)) : <span class="variable">$web</span>-bg</span><br><span class="line"><span class="variable">$mobile</span>-bg-day = <span class="built_in">hexo-config</span>(<span class="string">&#x27;background.mobileday&#x27;</span>) ? <span class="built_in">unquote</span>(<span class="built_in">hexo-config</span>(<span class="string">&#x27;background.mobileday&#x27;</span>)) : <span class="variable">$web</span>-bg</span><br><span class="line"><span class="variable">$mobile</span>-bg-night = <span class="built_in">hexo-config</span>(<span class="string">&#x27;background.mobilenight&#x27;</span>) ? <span class="built_in">unquote</span>(<span class="built_in">hexo-config</span>(<span class="string">&#x27;background.mobilenight&#x27;</span>)) : <span class="variable">$web</span>-bg-night</span><br><span class="line"><span class="selector-attr">[data-theme=<span class="string">&quot;dark&quot;</span>]</span></span><br><span class="line">  <span class="selector-id">#web_bg</span></span><br><span class="line">    <span class="attribute">background</span>: <span class="variable">$web</span>-bg-night</span><br><span class="line">    <span class="attribute">background-attachment</span>: local</span><br><span class="line">    <span class="attribute">background-position</span>: center</span><br><span class="line">    <span class="attribute">background-size</span>: cover</span><br><span class="line">    <span class="attribute">background-repeat</span>: no-repeat</span><br><span class="line"><span class="keyword">@media</span> screen <span class="keyword">and</span> (<span class="attribute">max-width</span>: <span class="number">800px</span>)</span><br><span class="line">  #web_bg</span><br><span class="line">    background: $mobile-bg-day !important</span><br><span class="line">    background-attachment: local !important</span><br><span class="line">    background-position: center !important</span><br><span class="line">    background-size: cover !important</span><br><span class="line">    background-repeat: no-repeat !important</span><br><span class="line">  [data-theme=&quot;dark&quot;]</span><br><span class="line">    #web_bg</span><br><span class="line">      background: $mobile-bg-night !important</span><br><span class="line">      background-attachment: local !important</span><br><span class="line">      background-position: center !important</span><br><span class="line">      background-size: cover !important</span><br><span class="line">      background-repeat: no-repeat !important</span><br></pre></td></tr></table></figure></li><li>然后还要修改一下<code>[Blogroot]\themes\butterfly\source\css\var.styl</code>,大约35行的位置<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">  $text-line-height = 2</span><br><span class="line"><span class="deletion">- $web-bg = hexo-config(&#x27;background&#x27;) &amp;&amp; unquote(hexo-config(&#x27;background&#x27;))</span></span><br><span class="line"><span class="addition">+ $web-bg = hexo-config(&#x27;background.default&#x27;) &amp;&amp; unquote(hexo-config(&#x27;background.default&#x27;))</span></span><br><span class="line">  $index_top_img_height = hexo-config(&#x27;index_top_img_height&#x27;) ? convert(hexo-config(&#x27;index_top_img_height&#x27;)) : 100vh</span><br></pre></td></tr></table></figure></li><li>最后我们再修改一下配置项，在<code>[Blogroot]/_config.butterfly.yml</code>中找到<code>background</code>配置项，内容改为：<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Website Background (設置網站背景)</span></span><br><span class="line"><span class="comment"># can set it to color or image (可設置圖片 或者 顔色)</span></span><br><span class="line"><span class="comment"># The formal of image: url(http://xxxxxx.com/xxx.jpg)</span></span><br><span class="line"><span class="attr">background:</span></span><br><span class="line">  <span class="attr">default:</span>  <span class="comment">#【必选】默认背景</span></span><br><span class="line">  <span class="attr">darkmode:</span> <span class="comment">#【可选】PC端夜间模式背景</span></span><br><span class="line">  <span class="attr">mobileday:</span> <span class="comment">#【可选】移动端日间默认背景</span></span><br><span class="line">  <span class="attr">mobilenight:</span> <span class="comment">#【可选】移动端夜间模式背景</span></span><br></pre></td></tr></table></figure></li><li>感谢@<a target="_blank" rel="noopener external nofollow noreferrer" href="https://toxics1udge.github.io/">Toxic</a>的反馈，开了pjax的用户会发现背景变了以后就变不回去了，需要刷新才行。因此为了实现期望的效果，这里还要再把<code>#web_bg</code>加到<code>pjax</code>选择器中。<br>修改<code>[Blogroot]\themes\butterfly\layout\includes\third-party\pjax.pug</code>,<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">  script(src=url_for(theme.CDN.pjax))</span><br><span class="line">  script.</span><br><span class="line">    let pjaxSelectors = [</span><br><span class="line">      &#x27;title&#x27;,</span><br><span class="line">      &#x27;#config-diff&#x27;,</span><br><span class="line">      &#x27;#body-wrap&#x27;,</span><br><span class="line">      &#x27;#rightside-config-hide&#x27;,</span><br><span class="line">      &#x27;#rightside-config-show&#x27;,</span><br><span class="line"><span class="addition">+     &#x27;#web_bg&#x27;,</span></span><br><span class="line">      &#x27;.js-pjax&#x27;</span><br><span class="line">    ]</span><br></pre></td></tr></table></figure></li></ol></div></details><h2 id="菜单栏多色图标配置教程"><a href="#菜单栏多色图标配置教程" class="headerlink" title="菜单栏多色图标配置教程"></a>菜单栏多色图标配置教程</h2><div class="note danger flat"><p>现在的iconfont可以在图标库的项目设置里直接打开彩色设置，然后采用fontclass的引用方式即可使用多彩图标。但是<strong>单一项目彩色图标上限是40个图标</strong>，相比之下symbol引入方案依然是最优解。<br><img src="" data-lazy-src="https://npm.elemecdn.com/akilar-candyassets/image/a11217c7.png" alt=""><br><img src="" data-lazy-src="https://npm.elemecdn.com/akilar-candyassets/image/110a882c.png" alt=""><br>详情参看<a href="/posts/d2ebecef/">Hexo引入阿里矢量图标库-iconfont inject</a></p></div><details class="folding-tag" purple><summary>点击查看菜单栏多色图标配置教程</summary><div class="content"><div class="note info flat"><p>部分客人在看完<code>iconfont</code>引入教程以后都试着将菜单栏改成<code>iconfont</code>图标，但是只能使用<code>fontclass</code>引入方案配合自定义<code>css</code>来实现单一彩色图标。而无法使用<code>symbol</code>引入方案。这是因为<code>symbol</code>引入方案和<code>fontclass</code>引入方案是基于不同原理，前者实质是一个<code>svg</code>，而后者实质是一个字体。为了能够实现<code>symbol</code>引入，毫无疑问是需要改动源码的。</p></div><div class="note warning flat"><ol><li>本方案中，通过二重判断，可以同时兼容<code>fontawesome</code>写法和<code>iconfont</code>的<code>symbol</code>写法，但是因为判断基准是基于开头是<code>fa</code>还是<code>icon</code>,所以若要使用<code>iconfont</code>的<code>fontclass</code>写法，就需要写成<code>fa icon-xxx</code>了。<del>有symbol了真的还有人会继续用fontclass吗？不会吧！不会吧！</del></li><li>因为<code>butterfly_v3.7.0改动了menu_item.pug</code>的基本结构，所以本方案不兼容低于<code>Butterfly_v3.7.0</code>的主题版本。可以在熟读教程的情况下自主适配低版本，或者根据最新版主题的<code>menu_item.pug</code>进行局部升级。(事实上可以把<code>menu_item.pug</code>全部代码改成和本帖一样，同时配置项也沿用本帖的即可)</li></ol></div><div class="tabs" id="menuitem"><ul class="nav-tabs"><li class="tab"><button type="button" data-href="#menuitem-1">静态图标</button></li><li class="tab"><button type="button" data-href="#menuitem-2">动态图标</button></li></ul><div class="tab-contents"><div class="tab-item-content" id="menuitem-1"><p></p><div class="note primary flat"><p>本方案前置教程为<a href="/posts/d2ebecef/">Hexo引入阿里矢量图标库-iconfont inject</a>,请确保您已经完成了前置教程，并实现了在文章中使用<code>symbol</code>写法来引入<code>iconfont</code>图标。</p></div><p></p><ol><li>修改<code>[Blogroot]\themes\butterfly\layout\includes\header\menu_item.pug</code>,<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br></pre></td><td class="code"><pre><span class="line">  if theme.menu</span><br><span class="line">    //- for mobile sidebar</span><br><span class="line">    - let sidebarChildHide = theme.hide_sidebar_menu_child ? &#x27;hide&#x27; : &#x27;&#x27;</span><br><span class="line"></span><br><span class="line">    .menus_items</span><br><span class="line">      each value, label in theme.menu</span><br><span class="line">        if typeof value !== &#x27;object&#x27;</span><br><span class="line">          .menus_item</span><br><span class="line">            a.site-page(href=url_for(trim(value.split(&#x27;||&#x27;)[0])))</span><br><span class="line">              if value.split(&#x27;||&#x27;)[1]</span><br><span class="line"><span class="deletion">-               i.fa-fw(class=trim(value.split(&#x27;||&#x27;)[1]))</span></span><br><span class="line"><span class="addition">+               - var icon_value = trim(value.split(&#x27;||&#x27;)[1])</span></span><br><span class="line"><span class="addition">+               if icon_value.substring(0,2)==&quot;fa&quot;      </span></span><br><span class="line"><span class="addition">+                 i.fa-fw(class=icon_value)</span></span><br><span class="line"><span class="addition">+               else if icon_value.substring(0,4)==&quot;icon&quot;          </span></span><br><span class="line"><span class="addition">+                 svg.icon(aria-hidden=&quot;true&quot;)</span></span><br><span class="line"><span class="addition">+                   use(xlink:href=`#`+ icon_value)</span></span><br><span class="line">              span=&#x27; &#x27;+label</span><br><span class="line">        else</span><br><span class="line">          .menus_item</span><br><span class="line">            a.site-page(href=&#x27;javascript:void(0);&#x27;)</span><br><span class="line">              if label.split(&#x27;||&#x27;)[1]</span><br><span class="line"><span class="deletion">-               i.fa-fw(class=trim(label.split(&#x27;||&#x27;)[1]))</span></span><br><span class="line"><span class="addition">+               - var icon_label = trim(label.split(&#x27;||&#x27;)[1])</span></span><br><span class="line"><span class="addition">+               if icon_label.substring(0,2)==&quot;fa&quot;      </span></span><br><span class="line"><span class="addition">+                 i.fa-fw(class=icon_label)</span></span><br><span class="line"><span class="addition">+               else if icon_label.substring(0,4)==&quot;icon&quot;    </span></span><br><span class="line"><span class="addition">+                 svg.icon(aria-hidden=&quot;true&quot;)</span></span><br><span class="line"><span class="addition">+                   use(xlink:href=`#`+ icon_label)</span></span><br><span class="line">              span=&#x27; &#x27;+ trim(label.split(&#x27;||&#x27;)[0])</span><br><span class="line">              i.fas.fa-chevron-down.expand(class=sidebarChildHide)</span><br><span class="line">            ul.menus_item_child</span><br><span class="line">              each val,lab in value</span><br><span class="line">                li</span><br><span class="line">                  a.faa-parent.animated-hover.site-page.child(href=url_for(trim(val.split(&#x27;||&#x27;)[0])))</span><br><span class="line">                    if val.split(&#x27;||&#x27;)[1]</span><br><span class="line"><span class="deletion">-                     i.fa-fw(class=trim(val.split(&#x27;||&#x27;)[1]))</span></span><br><span class="line"><span class="addition">+                     - var icon_val = trim(val.split(&#x27;||&#x27;)[1])</span></span><br><span class="line"><span class="addition">+                     if icon_val.substring(0,2)==&quot;fa&quot;      </span></span><br><span class="line"><span class="addition">+                       i.fa-fw(class=icon_val)</span></span><br><span class="line"><span class="addition">+                     else if icon_val.substring(0,4)==&quot;icon&quot;</span></span><br><span class="line"><span class="addition">+                       svg.icon(aria-hidden=&quot;true&quot;)</span></span><br><span class="line"><span class="addition">+                         use(xlink:href=`#`+ icon_val)</span></span><br><span class="line">                    span=&#x27; &#x27;+ lab</span><br></pre></td></tr></table></figure></li><li>此处再提供修改好以后的完整代码便于低版本用户复制<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br></pre></td><td class="code"><pre><span class="line">if theme.menu</span><br><span class="line">  //- for mobile sidebar</span><br><span class="line">  - let sidebarChildHide = theme.hide_sidebar_menu_child ? &#x27;hide&#x27; : &#x27;&#x27;</span><br><span class="line"></span><br><span class="line">  .menus_items</span><br><span class="line">    each value, label in theme.menu</span><br><span class="line">      if typeof value !== &#x27;object&#x27;</span><br><span class="line">        .menus_item</span><br><span class="line">          a.site-page(href=url_for(trim(value.split(&#x27;||&#x27;)[0])))</span><br><span class="line">            if value.split(&#x27;||&#x27;)[1]</span><br><span class="line">              - var icon_value = trim(value.split(&#x27;||&#x27;)[1])</span><br><span class="line">              if icon_value.substring(0,2)==&quot;fa&quot;      </span><br><span class="line">                i.fa-fw(class=icon_value)</span><br><span class="line">              else if icon_value.substring(0,4)==&quot;icon&quot;          </span><br><span class="line">                svg.icon(aria-hidden=&quot;true&quot;)</span><br><span class="line">                  use(xlink:href=`#`+ icon_value)</span><br><span class="line">            span=&#x27; &#x27;+label</span><br><span class="line">      else</span><br><span class="line">        .menus_item</span><br><span class="line">          a.site-page(href=&#x27;javascript:void(0);&#x27;)</span><br><span class="line">            if label.split(&#x27;||&#x27;)[1]</span><br><span class="line">              - var icon_label = trim(label.split(&#x27;||&#x27;)[1])</span><br><span class="line">              if icon_label.substring(0,2)==&quot;fa&quot;      </span><br><span class="line">                i.fa-fw(class=icon_label)</span><br><span class="line">              else if icon_label.substring(0,4)==&quot;icon&quot;    </span><br><span class="line">                svg.icon(aria-hidden=&quot;true&quot;)</span><br><span class="line">                  use(xlink:href=`#`+ icon_label)</span><br><span class="line">            span=&#x27; &#x27;+ trim(label.split(&#x27;||&#x27;)[0])</span><br><span class="line">            i.fas.fa-chevron-down.expand(class=sidebarChildHide)</span><br><span class="line">          ul.menus_item_child</span><br><span class="line">            each val,lab in value</span><br><span class="line">              li</span><br><span class="line">                a.site-page.child(href=url_for(trim(val.split(&#x27;||&#x27;)[0])))</span><br><span class="line">                  if val.split(&#x27;||&#x27;)[1]</span><br><span class="line">                    - var icon_val = trim(val.split(&#x27;||&#x27;)[1])</span><br><span class="line">                    if icon_val.substring(0,2)==&quot;fa&quot;      </span><br><span class="line">                      i.fa-fw(class=icon_val)</span><br><span class="line">                    else if icon_val.substring(0,4)==&quot;icon&quot;</span><br><span class="line">                      svg.icon(aria-hidden=&quot;true&quot;)</span><br><span class="line">                        use(xlink:href=`#`+ icon_val)</span><br><span class="line">                  span=&#x27; &#x27;+ lab</span><br></pre></td></tr></table></figure></li><li>以下是填写示例，在<code>[Blogroot]\_config.butterfly.yml</code>中修改。<code>icon-xxx</code>字样的为<code>iconfont</code>的<code>symbol</code>引入方案的<code>id</code>值，可以在你的<code>iconfont</code>图标库内查询。<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">menu:</span></span><br><span class="line">  <span class="string">主页:</span> <span class="string">https://blog.akilar.top/</span> <span class="string">||</span> <span class="string">fas</span> <span class="string">fa-tasks</span></span><br><span class="line">  <span class="string">博客:</span> <span class="string">/</span> <span class="string">||</span> <span class="string">icon-rat</span></span><br><span class="line">  <span class="string">生活</span> <span class="string">||</span> <span class="attr">icon-tiger :</span></span><br><span class="line">    <span class="string">相册:</span> <span class="string">/gallery/</span> <span class="string">||</span> <span class="string">fa</span> <span class="string">fa-camera</span></span><br><span class="line">    <span class="string">追番:</span> <span class="string">/bangumis/</span> <span class="string">||</span> <span class="string">icon-snake</span></span><br></pre></td></tr></table></figure></li></ol><button type="button" class="tab-to-top" aria-label="scroll to top"><i class="fas fa-arrow-up"></i></button></div><div class="tab-item-content" id="menuitem-2"><p></p><div class="note primary flat"><p>本方案前置教程为<a href="/posts/d2ebecef/">Hexo引入阿里矢量图标库-iconfont inject</a>和<a href="/posts/615e2dec/#动态标签-anima">基于Butterfly的外挂标签引入-Tag Plugins Plus</a>中关于<code>动态标签anima</code>的内容。<br>请确保您已经完成了前置教程，并实现了在文章中使用<code>symbol</code>写法来引入<code>iconfont</code>图标。同时引入了<code>fontawesome_animation</code>的前置依赖。<br>主要检查您的<code>inject</code>配置项中是否有这两个依赖<br></p><figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">inject:</span></span><br><span class="line">  <span class="attr">head:</span></span><br><span class="line">     <span class="comment">#动画标签anima的依赖</span></span><br><span class="line">     <span class="bullet">-</span> <span class="string">&lt;link</span> <span class="string">rel=&quot;stylesheet&quot;</span> <span class="string">href=&quot;https://cdn.jsdelivr.net/gh/l-lin/font-awesome-animation/dist/font-awesome-animation.min.css&quot;</span>  <span class="string">media=&quot;defer&quot;</span> <span class="string">onload=&quot;this.media=&#x27;all&#x27;&quot;&gt;</span></span><br><span class="line">  <span class="attr">bottom:</span></span><br><span class="line">    <span class="comment"># 阿里矢量图标,这串是我的图标库，你的链接会有所不同。</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">&lt;script</span> <span class="string">async</span> <span class="string">src=&quot;//at.alicdn.com/t/font_2032782_ev6ytrh30f.js&quot;&gt;&lt;/script&gt;</span></span><br></pre></td></tr></table></figure><p></p></div><p></p><ol><li>修改<code>[Blogroot]\themes\butterfly\layout\includes\header\menu_item.pug</code>,本方案默认使用观感最佳的悬停父元素触发子元素动画效果。默认动画为<code>faa-tada</code>。<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br></pre></td><td class="code"><pre><span class="line">  if theme.menu</span><br><span class="line">    //- for mobile sidebar</span><br><span class="line">    - let sidebarChildHide = theme.hide_sidebar_menu_child ? &#x27;hide&#x27; : &#x27;&#x27;</span><br><span class="line"></span><br><span class="line">    .menus_items</span><br><span class="line">      each value, label in theme.menu</span><br><span class="line">        if typeof value !== &#x27;object&#x27;</span><br><span class="line">          .menus_item</span><br><span class="line"><span class="deletion">-           a.site-page(href=url_for(trim(value.split(&#x27;||&#x27;)[0])))</span></span><br><span class="line"><span class="addition">+           a.site-page.faa-parent.animated-hover(href=url_for(trim(value.split(&#x27;||&#x27;)[0])))</span></span><br><span class="line">              if value.split(&#x27;||&#x27;)[1]</span><br><span class="line"><span class="deletion">-               i.fa-fw(class=trim(value.split(&#x27;||&#x27;)[1]))</span></span><br><span class="line"><span class="addition">+               - var icon_value = trim(value.split(&#x27;||&#x27;)[1])</span></span><br><span class="line"><span class="addition">+               - var anima_value = value.split(&#x27;||&#x27;)[2] ? trim(value.split(&#x27;||&#x27;)[2]) : &#x27;faa-tada&#x27;</span></span><br><span class="line"><span class="addition">+               if icon_value.substring(0,2)==&quot;fa&quot;      </span></span><br><span class="line"><span class="addition">+                 i.fa-fw(class=icon_value + &#x27; &#x27; + anima_value)</span></span><br><span class="line"><span class="addition">+               else if icon_value.substring(0,4)==&quot;icon&quot;          </span></span><br><span class="line"><span class="addition">+                 svg.icon(aria-hidden=&quot;true&quot; class=anima_value)</span></span><br><span class="line"><span class="addition">+                   use(xlink:href=`#`+ icon_value)</span></span><br><span class="line">              span=&#x27; &#x27;+label</span><br><span class="line">        else</span><br><span class="line">          .menus_item</span><br><span class="line"><span class="deletion">-           a.site-page(href=&#x27;javascript:void(0);&#x27;)</span></span><br><span class="line"><span class="addition">+           a.site-page.faa-parent.animated-hover(href=&#x27;javascript:void(0);&#x27;)</span></span><br><span class="line">              if label.split(&#x27;||&#x27;)[1]</span><br><span class="line"><span class="deletion">-               i.fa-fw(class=trim(label.split(&#x27;||&#x27;)[1]))</span></span><br><span class="line"><span class="addition">+               - var icon_label = trim(label.split(&#x27;||&#x27;)[1])</span></span><br><span class="line"><span class="addition">+               - var anima_label = label.split(&#x27;||&#x27;)[2] ? trim(label.split(&#x27;||&#x27;)[2]) : &#x27;faa-tada&#x27;</span></span><br><span class="line"><span class="addition">+               if icon_label.substring(0,2)==&quot;fa&quot;      </span></span><br><span class="line"><span class="addition">+                 i.fa-fw(class=icon_label + &#x27; &#x27; + anima_label)</span></span><br><span class="line"><span class="addition">+               else if icon_label.substring(0,4)==&quot;icon&quot;    </span></span><br><span class="line"><span class="addition">+                 svg.icon(aria-hidden=&quot;true&quot; class=anima_label)</span></span><br><span class="line"><span class="addition">+                   use(xlink:href=`#`+ icon_label)</span></span><br><span class="line">              span=&#x27; &#x27;+ trim(label.split(&#x27;||&#x27;)[0])</span><br><span class="line">              i.fas.fa-chevron-down.expand(class=sidebarChildHide)</span><br><span class="line">            ul.menus_item_child</span><br><span class="line">              each val,lab in value</span><br><span class="line">                li</span><br><span class="line"><span class="deletion">-                 a.site-page.child(href=url_for(trim(val.split(&#x27;||&#x27;)[0])))</span></span><br><span class="line"><span class="addition">+                 a.site-page.child.faa-parent.animated-hover(href=url_for(trim(val.split(&#x27;||&#x27;)[0])))</span></span><br><span class="line">                    if val.split(&#x27;||&#x27;)[1]</span><br><span class="line"><span class="deletion">-                     i.fa-fw(class=trim(val.split(&#x27;||&#x27;)[1]))</span></span><br><span class="line"><span class="addition">+                     - var icon_val = trim(val.split(&#x27;||&#x27;)[1])</span></span><br><span class="line"><span class="addition">+                     - var anima_val = val.split(&#x27;||&#x27;)[2] ? trim(val.split(&#x27;||&#x27;)[2]) : &#x27;faa-tada&#x27;</span></span><br><span class="line"><span class="addition">+                     if icon_val.substring(0,2)==&quot;fa&quot;      </span></span><br><span class="line"><span class="addition">+                       i.fa-fw(class=icon_val + &#x27; &#x27; + anima_val)</span></span><br><span class="line"><span class="addition">+                     else if icon_val.substring(0,4)==&quot;icon&quot;</span></span><br><span class="line"><span class="addition">+                       svg.icon(aria-hidden=&quot;true&quot; class=anima_val)</span></span><br><span class="line"><span class="addition">+                         use(xlink:href=`#`+ icon_val)</span></span><br><span class="line">                    span=&#x27; &#x27;+ lab</span><br></pre></td></tr></table></figure></li><li>此处再提供修改好以后的完整代码便于低版本用户复制<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br></pre></td><td class="code"><pre><span class="line">if theme.menu</span><br><span class="line">  //- for mobile sidebar</span><br><span class="line">  - let sidebarChildHide = theme.hide_sidebar_menu_child ? &#x27;hide&#x27; : &#x27;&#x27;</span><br><span class="line"></span><br><span class="line">  .menus_items</span><br><span class="line">    each value, label in theme.menu</span><br><span class="line">      if typeof value !== &#x27;object&#x27;</span><br><span class="line">        .menus_item</span><br><span class="line">          a.site-page.faa-parent.animated-hover(href=url_for(trim(value.split(&#x27;||&#x27;)[0])))</span><br><span class="line">            if value.split(&#x27;||&#x27;)[1]</span><br><span class="line">              - var icon_value = trim(value.split(&#x27;||&#x27;)[1])</span><br><span class="line">              - var anima_value = value.split(&#x27;||&#x27;)[2] ? trim(value.split(&#x27;||&#x27;)[2]) : &#x27;faa-tada&#x27;</span><br><span class="line">              if icon_value.substring(0,2)==&quot;fa&quot;      </span><br><span class="line">                i.fa-fw(class=icon_value + &#x27; &#x27; + anima_value)</span><br><span class="line">              else if icon_value.substring(0,4)==&quot;icon&quot;          </span><br><span class="line">                svg.icon(aria-hidden=&quot;true&quot; class=anima_value)</span><br><span class="line">                  use(xlink:href=`#`+ icon_value)</span><br><span class="line">            span=&#x27; &#x27;+label</span><br><span class="line">      else</span><br><span class="line">        .menus_item</span><br><span class="line">          a.site-page.faa-parent.animated-hover(href=&#x27;javascript:void(0);&#x27;)</span><br><span class="line">            if label.split(&#x27;||&#x27;)[1]</span><br><span class="line">              - var icon_label = trim(label.split(&#x27;||&#x27;)[1])</span><br><span class="line">              - var anima_label = label.split(&#x27;||&#x27;)[2] ? trim(label.split(&#x27;||&#x27;)[2]) : &#x27;faa-tada&#x27;</span><br><span class="line">              if icon_label.substring(0,2)==&quot;fa&quot;      </span><br><span class="line">                i.fa-fw(class=icon_label + &#x27; &#x27; + anima_label)</span><br><span class="line">              else if icon_label.substring(0,4)==&quot;icon&quot;    </span><br><span class="line">                svg.icon(aria-hidden=&quot;true&quot; class=anima_label)</span><br><span class="line">                  use(xlink:href=`#`+ icon_label)</span><br><span class="line">            span=&#x27; &#x27;+ trim(label.split(&#x27;||&#x27;)[0])</span><br><span class="line">            i.fas.fa-chevron-down.expand(class=sidebarChildHide)</span><br><span class="line">          ul.menus_item_child</span><br><span class="line">            each val,lab in value</span><br><span class="line">              li</span><br><span class="line">                a.site-page.child.faa-parent.animated-hover(href=url_for(trim(val.split(&#x27;||&#x27;)[0])))</span><br><span class="line">                  if val.split(&#x27;||&#x27;)[1]</span><br><span class="line">                    - var icon_val = trim(val.split(&#x27;||&#x27;)[1])</span><br><span class="line">                    - var anima_val = val.split(&#x27;||&#x27;)[2] ? trim(val.split(&#x27;||&#x27;)[2]) : &#x27;faa-tada&#x27;</span><br><span class="line">                    if icon_val.substring(0,2)==&quot;fa&quot;      </span><br><span class="line">                      i.fa-fw(class=icon_val + &#x27; &#x27; + anima_val)</span><br><span class="line">                    else if icon_val.substring(0,4)==&quot;icon&quot;</span><br><span class="line">                      svg.icon(aria-hidden=&quot;true&quot; class=anima_val)</span><br><span class="line">                        use(xlink:href=`#`+ icon_val)</span><br><span class="line">                  span=&#x27; &#x27;+ lab</span><br></pre></td></tr></table></figure></li><li>以下是填写示例，在<code>[Blogroot]\_config.butterfly.yml</code>中修改。<code>icon-xxx</code>字样的为<code>iconfont</code>的<code>symbol</code>引入方案的<code>id</code>值，可以在你的<code>iconfont</code>图标库内查询。<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">menu:</span></span><br><span class="line">  <span class="string">主页:</span> <span class="string">https://blog.akilar.top/</span> <span class="string">||</span> <span class="string">fas</span> <span class="string">fa-tasks</span> <span class="string">||</span> <span class="string">faa-tada</span></span><br><span class="line">  <span class="string">博客:</span> <span class="string">/</span> <span class="string">||</span> <span class="string">icon-rat</span> <span class="string">||</span> <span class="string">faa-tada</span></span><br><span class="line">  <span class="string">生活</span> <span class="string">||</span> <span class="string">icon-tiger</span> <span class="string">||</span> <span class="attr">faa-tada :</span></span><br><span class="line">    <span class="string">相册:</span> <span class="string">/gallery/</span> <span class="string">||</span> <span class="string">fa</span> <span class="string">fa-camera</span> <span class="string">||</span> <span class="string">faa-tada</span></span><br><span class="line">    <span class="string">追番:</span> <span class="string">/bangumis/</span> <span class="string">||</span> <span class="string">icon-snake</span> <span class="string">||</span> <span class="string">faa-tada</span></span><br></pre></td></tr></table></figure></li></ol><button type="button" class="tab-to-top" aria-label="scroll to top"><i class="fas fa-arrow-up"></i></button></div></div></div><details class="folding-tag" blue><summary>店长的碎碎念</summary><div class="content"><p>其实原本fontawesome写法是不需要加双竖线来分割的。但是为了统一格式使得观感良好，这里特地加了一行代码。看起来有画蛇添足之嫌，却让最终的配置项显得和谐一些。<br>整个开发过程其实就是一种妥协。如果想要兼容所有的写法，就需要写更多的判断机制，对我来说是得不偿失的。<br>另外我并不喜欢在menu-item里使用symbol方案的iconfont图标，因为它很难做夜间模式适配，只能通过filter滤镜属性来改写明暗对比度。单纯的反色就好像负片一样，效果一言难尽。只能说是尽量在一开始选择图标的时候就考虑好背景的明暗变化。或者干脆在夜间模式时给他加个泛光阴影底色效果。</p></div></details></div></details><h2 id="Social卡片彩色图标引入"><a href="#Social卡片彩色图标引入" class="headerlink" title="Social卡片彩色图标引入"></a>Social卡片彩色图标引入</h2><div class="note danger flat"><p>现在的iconfont可以在图标库的项目设置里直接打开彩色设置，然后采用fontclass的引用方式即可使用多彩图标。但是<strong>单一项目彩色图标上限是40个图标</strong>，相比之下symbol方案依然是最优解。<br><img src="" data-lazy-src="https://npm.elemecdn.com/akilar-candyassets/image/a11217c7.png" alt=""><br><img src="" data-lazy-src="https://npm.elemecdn.com/akilar-candyassets/image/110a882c.png" alt=""><br>详情参看<a href="/posts/d2ebecef/">Hexo引入阿里矢量图标库-iconfont inject</a></p></div><details class="folding-tag" green><summary>点击查看Social卡片彩色图标引入教程</summary><div class="content"><div class="note info flat"><p>代码原理和上面的菜单栏基本一致。所以各个前置教程都不再重复。这里只提供代码魔改内容和配置项编写方案。</p></div><div class="tabs" id="social"><ul class="nav-tabs"><li class="tab"><button type="button" data-href="#social-1">静态图标</button></li><li class="tab"><button type="button" data-href="#social-2">动态图标</button></li></ul><div class="tab-contents"><div class="tab-item-content" id="social-1"><ol><li>重写<code>[Blogroot]\themes\butterfly\layout\includes\header\social.pug</code>,替换为以下代码：<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">each value, title in theme.social</span><br><span class="line">  a.social-icon(href=url_for(trim(value.split(&#x27;||&#x27;)[0])) target=&quot;_blank&quot; title=title === undefined ? &#x27;&#x27; : trim(title))</span><br><span class="line">    if value.split(&#x27;||&#x27;)[1]</span><br><span class="line">      - var icon_value = trim(value.split(&#x27;||&#x27;)[1])</span><br><span class="line">      if icon_value.substring(0,2)==&quot;fa&quot;      </span><br><span class="line">        i.fa-fw(class=icon_value)</span><br><span class="line">      else if icon_value.substring(0,4)==&quot;icon&quot;          </span><br><span class="line">        svg.icon(aria-hidden=&quot;true&quot;)</span><br><span class="line">          use(xlink:href=`#`+ icon_value)</span><br></pre></td></tr></table></figure></li><li>以下为对应的<code>social</code>配置项。写法沿用<code>menu_item</code>的写法示例。<del>早就想吐槽butterfly里menu和social截然相反的配置项写法了</del>。修改<code>[Blogroot]\_config.butterfly.yml</code>的<code>social</code>配置项。<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">social:</span></span><br><span class="line">  <span class="comment"># iconfont多彩图标</span></span><br><span class="line">  <span class="attr">Github:</span> <span class="string">https://github.com/Akilarlxh</span> <span class="string">||</span> <span class="string">icon-rat</span></span><br><span class="line">  <span class="comment"># fontawesome单色图标</span></span><br><span class="line">  <span class="attr">Email:</span> <span class="string">mailto:Akilarlxh@gmail.com</span> <span class="string">||</span> <span class="string">fas</span> <span class="string">fa-envelope</span></span><br><span class="line">  <span class="comment"># iconfont单色图标</span></span><br><span class="line">  <span class="attr">Bilibili:</span> <span class="string">https://space.bilibili.com/22976782</span> <span class="string">||</span> <span class="string">fa</span> <span class="string">icon-ox</span></span><br></pre></td></tr></table></figure></li></ol><button type="button" class="tab-to-top" aria-label="scroll to top"><i class="fas fa-arrow-up"></i></button></div><div class="tab-item-content" id="social-2"><ol><li>重写<code>[Blogroot]\themes\butterfly\layout\includes\header\social.pug</code>,替换为以下代码：<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">each value, title in theme.social</span><br><span class="line">  a.social-icon.faa-parent.animated-hover(href=url_for(trim(value.split(&#x27;||&#x27;)[0])) target=&quot;_blank&quot; title=title === undefined ? &#x27;&#x27; : trim(title))</span><br><span class="line">    if value.split(&#x27;||&#x27;)[1]</span><br><span class="line">      - var icon_value = trim(value.split(&#x27;||&#x27;)[1])</span><br><span class="line">      - var anima_value = value.split(&#x27;||&#x27;)[2] ? trim(value.split(&#x27;||&#x27;)[2]) : &#x27;faa-tada&#x27;</span><br><span class="line">      if icon_value.substring(0,2)==&quot;fa&quot;      </span><br><span class="line">        i.fa-fw(class=icon_value + &#x27; &#x27; + anima_value)</span><br><span class="line">      else if icon_value.substring(0,4)==&quot;icon&quot;          </span><br><span class="line">        svg.icon(aria-hidden=&quot;true&quot; class=anima_value)</span><br><span class="line">          use(xlink:href=`#`+ icon_value)</span><br></pre></td></tr></table></figure></li><li>以下为对应的<code>social</code>配置项。写法沿用<code>menu_item</code>的写法示例。<del>早就想吐槽butterfly里menu和social截然相反的配置项写法了</del>。修改<code>[Blogroot]\_config.butterfly.yml</code>的<code>social</code>配置项。<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">social:</span></span><br><span class="line">  <span class="comment"># iconfont多彩图标</span></span><br><span class="line">  <span class="attr">Github:</span> <span class="string">https://github.com/Akilarlxh</span> <span class="string">||</span> <span class="string">icon-rat</span> <span class="string">||</span> <span class="string">faa-tada</span></span><br><span class="line">  <span class="comment"># fontawesome单色图标</span></span><br><span class="line">  <span class="attr">Email:</span> <span class="string">mailto:Akilarlxh@gmail.com</span> <span class="string">||</span> <span class="string">fas</span> <span class="string">fa-envelope</span> <span class="string">||</span> <span class="string">faa-tada</span></span><br><span class="line">  <span class="comment"># iconfont单色图标</span></span><br><span class="line">  <span class="attr">Bilibili:</span> <span class="string">https://space.bilibili.com/22976782</span> <span class="string">||</span> <span class="string">icon-ox</span> <span class="string">||</span> <span class="string">faa-tada</span></span><br></pre></td></tr></table></figure></li></ol><button type="button" class="tab-to-top" aria-label="scroll to top"><i class="fas fa-arrow-up"></i></button></div></div></div></div></details><h2 id="首页页码样式调整"><a href="#首页页码样式调整" class="headerlink" title="首页页码样式调整"></a>首页页码样式调整</h2><details class="folding-tag" red><summary>点击查看首页页码样式调整教程</summary><div class="content"><p></p><div class="note warning flat"><p>本魔改方案是基于<code>Butterfly_v4.1.0</code>进行修改，考虑到v4.0开始首页的按钮样式配色已经做了修改。旧版可能不兼容。<br>在进行本帖更改前，我已经对文章内的页码做了修改，详情参考“<a href="/posts/b77e1c58/">butterfly文章页面上下篇按钮UI调整</a>”,所以不保证普适性。<br>在进行本项魔改前，请务必做好文件备份方便回退。</p></div><p></p><ol><li>修改<code>[Blogroot]\themes\butterfly\source\css\_layout\pagination.styl</code>,将整个文件替换成以下内容，不保证魔改普适性，请务必记得做好文件备份方便回退！开头为效果配色，可以自行调整成适合自己的。<figure class="highlight styl"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-pseudo">:root</span></span><br><span class="line">  <span class="attr">--pagenumber-color</span>: <span class="number">#ffffff</span></span><br><span class="line">  <span class="attr">--pagenumber-current-color</span>: <span class="number">#1E7EE2</span></span><br><span class="line">  <span class="attr">--pagenumber-current-shadow-color</span>: <span class="number">#104477</span></span><br><span class="line">  <span class="attr">--pagenumber-hover-color</span>: <span class="number">#1E7EE2</span></span><br><span class="line">  <span class="attr">--pagenumber-background-color</span>: <span class="built_in">rgba</span>(<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0.85</span>)</span><br><span class="line"><span class="selector-attr">[data-theme=<span class="string">&quot;dark&quot;</span>]</span></span><br><span class="line">  <span class="attr">--pagenumber-color</span>: <span class="number">#ffffff</span></span><br><span class="line">  <span class="attr">--pagenumber-current-color</span>: <span class="number">#1E7EE2</span></span><br><span class="line">  <span class="attr">--pagenumber-current-shadow-color</span>: <span class="number">#104477</span></span><br><span class="line">  <span class="attr">--pagenumber-hover-color</span>: <span class="number">#1E7EE2</span></span><br><span class="line">  <span class="attr">--pagenumber-background-color</span>: <span class="built_in">rgba</span>(<span class="number">120</span>, <span class="number">120</span>, <span class="number">120</span>, <span class="number">0.85</span>)</span><br><span class="line"><span class="selector-id">#pagination</span></span><br><span class="line">  <span class="selector-class">.pagination</span></span><br><span class="line">    <span class="attribute">margin-top</span>: <span class="number">20px</span></span><br><span class="line">    <span class="attribute">text-align</span>: center</span><br><span class="line">    <span class="attribute">position</span>: relative;</span><br><span class="line">    <span class="selector-tag">a</span></span><br><span class="line">      <span class="attribute">color</span>: <span class="built_in">var</span>(--pagenumber-color)</span><br><span class="line">    <span class="selector-pseudo">&amp;::after</span></span><br><span class="line">      <span class="attribute">content</span> <span class="string">&#x27;&#x27;</span></span><br><span class="line">      <span class="attribute">position</span> absolute</span><br><span class="line">      <span class="attribute">width</span> <span class="number">100%</span></span><br><span class="line">      <span class="attribute">height</span> <span class="number">35px</span></span><br><span class="line">      <span class="attribute">left</span> <span class="number">0</span></span><br><span class="line">      <span class="attribute">bottom</span> <span class="number">0</span></span><br><span class="line">      <span class="attribute">z-index</span> -<span class="number">1</span></span><br><span class="line">      <span class="attribute">background-image</span> <span class="built_in">-moz-linear-gradient</span>(left, <span class="built_in">rgba</span>(<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>) <span class="number">0%</span>, <span class="built_in">var</span>(--pagenumber-background-color) <span class="number">40%</span>, <span class="built_in">var</span>(--pagenumber-background-color) <span class="number">50%</span>, <span class="built_in">var</span>(--pagenumber-background-color) <span class="number">60%</span>, <span class="built_in">rgba</span>(<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>) <span class="number">100%</span>)</span><br><span class="line">      <span class="attribute">background-image</span> <span class="built_in">-webkit-linear-gradient</span>(left, <span class="built_in">rgba</span>(<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>) <span class="number">0%</span>, <span class="built_in">var</span>(--pagenumber-background-color) <span class="number">40%</span>, <span class="built_in">var</span>(--pagenumber-background-color) <span class="number">50%</span>, <span class="built_in">var</span>(--pagenumber-background-color) <span class="number">60%</span>, <span class="built_in">rgba</span>(<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>) <span class="number">100%</span>)</span><br><span class="line">      <span class="attribute">background-image</span> <span class="built_in">linear-gradient</span>(to right, <span class="built_in">rgba</span>(<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>) <span class="number">0%</span>, <span class="built_in">var</span>(--pagenumber-background-color) <span class="number">40%</span>, <span class="built_in">var</span>(--pagenumber-background-color) <span class="number">50%</span>, <span class="built_in">var</span>(--pagenumber-background-color) <span class="number">60%</span>, <span class="built_in">rgba</span>(<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>) <span class="number">100%</span>)</span><br><span class="line">  <span class="selector-class">.page-number</span></span><br><span class="line">    &amp;<span class="selector-class">.current</span></span><br><span class="line">      <span class="attribute">background</span> <span class="built_in">var</span>(--pagenumber-current-color)</span><br><span class="line">      <span class="attribute">color</span> <span class="built_in">var</span>(--pagenumber-color)</span><br><span class="line">      <span class="attribute">padding</span>: <span class="number">9px</span> <span class="number">3px</span> <span class="number">0px</span> <span class="number">3px</span>;</span><br><span class="line">      <span class="attribute">height</span>: <span class="number">40px</span>;</span><br><span class="line">      <span class="selector-pseudo">&amp;:before</span></span><br><span class="line">        <span class="attribute">content</span>: <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">        <span class="attribute">position</span>: absolute;</span><br><span class="line">        <span class="attribute">top</span>: -<span class="number">10px</span>;</span><br><span class="line">        <span class="attribute">transform</span>: <span class="built_in">translateX</span>(-<span class="number">20px</span>);</span><br><span class="line">        <span class="attribute">width</span>: <span class="number">30px</span>;</span><br><span class="line">        <span class="attribute">border</span>: <span class="number">10px</span> solid transparent;</span><br><span class="line">        <span class="attribute">border-bottom</span>: <span class="number">7px</span> solid <span class="built_in">var</span>(--pagenumber-current-shadow-color);</span><br><span class="line">        <span class="attribute">z-index</span>: -<span class="number">1</span>;</span><br><span class="line">        <span class="selector-pseudo">&amp;:hover</span></span><br><span class="line">          <span class="selector-pseudo">&amp;::after</span></span><br><span class="line">            <span class="attribute">display</span> none</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="selector-class">.layout</span></span><br><span class="line">  &amp; &gt; <span class="selector-class">.recent-posts</span></span><br><span class="line">    <span class="selector-class">.pagination</span></span><br><span class="line">      &amp; &gt; *</span><br><span class="line">        <span class="attribute">display</span>: inline-block</span><br><span class="line">        <span class="attribute">margin</span>: <span class="number">0</span> <span class="number">6px</span></span><br><span class="line">        <span class="attribute">min-width</span>: <span class="number">30px</span></span><br><span class="line">        <span class="attribute">width</span>: auto</span><br><span class="line">        <span class="attribute">height</span>: <span class="number">35px</span></span><br><span class="line">        <span class="attribute">line-height</span>: <span class="number">30px</span></span><br><span class="line">        <span class="attribute">padding</span>: <span class="number">4px</span> <span class="number">3px</span> <span class="number">0px</span> <span class="number">3px</span>;</span><br><span class="line"></span><br><span class="line">      &amp; &gt; *<span class="selector-pseudo">:not</span>(.space)</span><br><span class="line">        <span class="selector-pseudo">&amp;:hover</span></span><br><span class="line">          <span class="attribute">background</span>: <span class="built_in">var</span>(--pagenumber-hover-color)</span><br><span class="line">          <span class="attribute">color</span>: <span class="built_in">var</span>(--pagenumber-color)</span><br><span class="line"></span><br><span class="line">  &amp; &gt; <span class="selector-tag">div</span><span class="selector-pseudo">:not</span>(.recent-posts)</span><br><span class="line">    <span class="selector-class">.pagination</span></span><br><span class="line">      <span class="selector-class">.page-number</span></span><br><span class="line">        <span class="attribute">color</span>: <span class="built_in">var</span>(--pagenumber-color);</span><br><span class="line">        <span class="attribute">padding</span>: <span class="number">13px</span> <span class="number">5px</span> <span class="number">5px</span>;</span><br><span class="line">        <span class="attribute">margin</span>: <span class="number">0</span> <span class="number">10px</span>;</span><br><span class="line">        <span class="attribute">position</span>: relative;</span><br><span class="line">        <span class="selector-pseudo">&amp;:hover</span></span><br><span class="line">          <span class="attribute">color</span>: <span class="built_in">var</span>(--pagenumber-color)</span><br><span class="line">          <span class="selector-pseudo">&amp;::after</span></span><br><span class="line">            <span class="attribute">content</span> <span class="string">&#x27;&#x27;</span></span><br><span class="line">            <span class="attribute">position</span> absolute</span><br><span class="line">            <span class="attribute">width</span> <span class="number">24px</span></span><br><span class="line">            <span class="attribute">height</span> <span class="number">24px</span></span><br><span class="line">            <span class="attribute">background</span> <span class="built_in">var</span>(--pagenumber-hover-color)</span><br><span class="line">            -moz-<span class="attribute">border-radius</span> <span class="number">100%</span></span><br><span class="line">            -webkit-<span class="attribute">border-radius</span> <span class="number">100%</span></span><br><span class="line">            <span class="attribute">border-radius</span> <span class="number">100%</span></span><br><span class="line">            <span class="attribute">z-index</span> -<span class="number">1</span></span><br><span class="line">            <span class="attribute">left</span> -<span class="number">3px</span></span><br><span class="line">            <span class="attribute">bottom</span> <span class="number">4px</span></span><br><span class="line">            <span class="attribute">margin</span> auto</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="selector-class">.pagination-info</span></span><br><span class="line">    <span class="attribute">position</span>: absolute</span><br><span class="line">    <span class="attribute">top</span>: <span class="number">50%</span></span><br><span class="line">    <span class="attribute">padding</span>: <span class="number">20px</span> <span class="number">40px</span></span><br><span class="line">    <span class="attribute">width</span>: <span class="number">100%</span></span><br><span class="line">    <span class="attribute">transform</span>: <span class="built_in">translate</span>(<span class="number">0</span>, -<span class="number">50%</span>)</span><br><span class="line"></span><br><span class="line">  <span class="selector-class">.prev_info</span>,</span><br><span class="line">  <span class="selector-class">.next_info</span></span><br><span class="line">    <span class="keyword">@extend</span> <span class="selector-class">.limit-one-line</span></span><br><span class="line">    <span class="attribute">color</span>: <span class="built_in">var</span>(--white)</span><br><span class="line">    <span class="attribute">font-weight</span>: <span class="number">500</span></span><br><span class="line"></span><br><span class="line">  <span class="selector-class">.next-post</span></span><br><span class="line">    <span class="selector-class">.pagination-info</span></span><br><span class="line">      <span class="attribute">text-align</span>: right</span><br><span class="line"></span><br><span class="line">  <span class="selector-class">.pull-full</span></span><br><span class="line">    <span class="attribute">width</span>: <span class="number">100%</span> <span class="meta">!important</span></span><br><span class="line"></span><br><span class="line">  <span class="selector-class">.prev-post</span> <span class="selector-class">.label</span>,</span><br><span class="line">  <span class="selector-class">.next-post</span> <span class="selector-class">.label</span></span><br><span class="line">    <span class="attribute">color</span>: <span class="built_in">var</span>(--light-grey)</span><br><span class="line">    <span class="attribute">text-transform</span>: uppercase</span><br><span class="line">    <span class="attribute">font-size</span>: <span class="number">90%</span></span><br><span class="line"></span><br><span class="line">  <span class="selector-class">.prev-post</span>,</span><br><span class="line">  <span class="selector-class">.next-post</span></span><br><span class="line">    <span class="keyword">@extend</span> <span class="selector-class">.postImgHover</span></span><br><span class="line">    <span class="attribute">width</span>: <span class="number">50%</span></span><br><span class="line"></span><br><span class="line">    +<span class="built_in">maxWidth768</span>()</span><br><span class="line">      <span class="attribute">width</span>: <span class="number">100%</span></span><br><span class="line"></span><br><span class="line">    <span class="selector-tag">a</span></span><br><span class="line">      <span class="attribute">position</span>: relative</span><br><span class="line">      <span class="attribute">display</span>: block</span><br><span class="line">      <span class="attribute">overflow</span>: hidden</span><br><span class="line">      <span class="attribute">height</span>: <span class="number">150px</span></span><br><span class="line"></span><br><span class="line">  &amp;<span class="selector-class">.pagination-post</span></span><br><span class="line">    <span class="attribute">overflow</span>: hidden</span><br><span class="line">    <span class="attribute">margin-top</span>: <span class="number">40px</span></span><br><span class="line">    <span class="attribute">width</span>: <span class="number">100%</span></span><br><span class="line">    <span class="attribute">background</span>: <span class="variable">$dark</span>-black</span><br></pre></td></tr></table></figure></li></ol></div></details></article><div class="post-copyright"><div class="post-copyright__title"><span class="post-copyright-info"><h>糖果屋微调合集</h></span></div><div class="post-copyright__type"><span class="post-copyright-info"><a href="https://akilar.top/posts/23fdf850/">https://akilar.top/posts/23fdf850/</a></span></div><div class="post-copyright-m"><div class="post-copyright-m-info"><div class="post-copyright-a"><h>作者</h><div class="post-copyright-cc-info"><h>Akilar</h></div></div><div class="post-copyright-c"><h>发布于</h><div class="post-copyright-cc-info"><h>2021-01-21</h></div></div><div class="post-copyright-u"><h>更新于</h><div class="post-copyright-cc-info"><h>2022-04-06</h></div></div><div class="post-copyright-c"><h>许可协议</h><div class="post-copyright-cc-info"><a class="icon" rel="noopener external nofollow noreferrer" target="_blank" title="Creative Commons" href="https://creativecommons.org/"><i class="fab fa-creative-commons"></i></a><a rel="noopener external nofollow noreferrer" target="_blank" title="CC BY-NC-SA 4.0" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a></div></div></div></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/%F0%9F%93%81Hexo/">📁Hexo</a><a class="post-meta__tags" href="/tags/%F0%9F%A6%8BButterfly/">🦋Butterfly</a></div><div class="post_share"></div></div><link rel="stylesheet" href="https://npm.elemecdn.com/akiblog@1.0.1/css/coin.css" media="defer" onload='this.media="all"'><div class="post-reward"><button class="tip-button reward-button"><span class="tip-button__text">不给糖果就捣蛋</span><div class="coin-wrapper"><div class="coin"><div class="coin__middle"></div><div class="coin__back"></div><div class="coin__front"></div></div></div><div class="reward-main"><ul class="reward-all"><li class="reward-item"><a href="https://npm.elemecdn.com/akiblog@1.0.1/img/wechat.png" rel="external nofollow noreferrer" target="_blank"><img class="post-qr-code-img" src="" data-lazy-src="https://npm.elemecdn.com/akiblog@1.0.1/img/wechat.png" alt="wechat"></a><div class="post-qr-code-desc">wechat</div></li><li class="reward-item"><a href="https://npm.elemecdn.com/akiblog@1.0.1/img/alipay.png" rel="external nofollow noreferrer" target="_blank"><img class="post-qr-code-img" src="" data-lazy-src="https://npm.elemecdn.com/akiblog@1.0.1/img/alipay.png" alt="alipay"></a><div class="post-qr-code-desc">alipay</div></li></ul></div></button></div><audio id="coinAudio" src="https://npm.elemecdn.com/akilar-candyassets/audio/aowu.m4a"></audio><script defer src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/coin.js"></script><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="javascript:void(0);" rel="external nofollow noreferrer" onclick="SAONotify(&quot;Prev Post&quot;,&quot;是否跳转至上一篇：&lt;br&gt;Bilibili Dynamic Banner&quot;,&quot;pjax.loadUrl('/posts/780a2cea/')&quot;)" title="Bilibili Dynamic Banner"><i class="fas fa-chevron-left prev-icon"><div class="prev-label">上一篇</div></i></a><div class="pagination-card"><img class="prev-cover" src="" data-lazy-src="https://img.zcool.cn/community/0183d061dd8ce511013e8cd04451eb.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,q_100" onerror='onerror=null,src="https://npm.elemecdn.com/akiblog@1.0.1/img/loading.gif"' alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">Bilibili Dynamic Banner</div></div></div></div><div class="next-post pull-right"><a href="javascript:void(0);" rel="external nofollow noreferrer" onclick="SAONotify(&quot;Next Post&quot;,&quot;是否跳转至下一篇：&lt;br&gt;SAO UI Plan -- SAO Utils Web 1.0&quot;,&quot;pjax.loadUrl('/posts/3b4c07bd/')&quot;)" title="SAO UI Plan -- SAO Utils Web 1.0"><i class="fas fa-chevron-right next-icon"><div class="next-label">下一篇</div></i></a><div class="pagination-card"><img class="next-cover" src="" data-lazy-src="https://npm.elemecdn.com/akilar-candyassets/image/SAO-Utils-53b2c0a5.png" onerror='onerror=null,src="https://npm.elemecdn.com/akiblog@1.0.1/img/loading.gif"' alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">SAO UI Plan -- SAO Utils Web 1.0</div></div></div></div></nav><div class="business-center"><div class="business-card"><div class="business-flip"><div class="business-front"><div class="business-strip-bottom"></div><div class="business-strip-top"></div><img class="business-logo" width="80" height="80" src="" data-lazy-src="https://npm.elemecdn.com/akiblog@1.0.1/img/cardcode.png" alt="cardcode"><div class="business-Invitation">Invitation</div><div class="business-chip"><div class="business-chip-line"></div><div class="business-chip-line"></div><div class="business-chip-line"></div><div class="business-chip-line"></div><div class="business-chip-main"></div></div><svg class="business-wave" viewBox="0 3.71 26.959 38.787" width="26.959" height="38.787" fill="white"><path d="M19.709 3.719c.266.043.5.187.656.406 4.125 5.207 6.594 11.781 6.594 18.938 0 7.156-2.469 13.73-6.594 18.937-.195.336-.57.531-.957.492a.9946.9946 0 0 1-.851-.66c-.129-.367-.035-.777.246-1.051 3.855-4.867 6.156-11.023 6.156-17.718 0-6.696-2.301-12.852-6.156-17.719-.262-.317-.301-.762-.102-1.121.204-.36.602-.559 1.008-.504z"></path><path d="M13.74 7.563c.231.039.442.164.594.343 3.508 4.059 5.625 9.371 5.625 15.157 0 5.785-2.113 11.097-5.625 15.156-.363.422-1 .472-1.422.109-.422-.363-.472-1-.109-1.422 3.211-3.711 5.156-8.551 5.156-13.843 0-5.293-1.949-10.133-5.156-13.844-.27-.309-.324-.75-.141-1.114.188-.367.578-.582.985-.542h.093z"></path><path d="M7.584 11.438c.227.031.438.144.594.312 2.953 2.863 4.781 6.875 4.781 11.313 0 4.433-1.828 8.449-4.781 11.312-.398.387-1.035.383-1.422-.016-.387-.398-.383-1.035.016-1.421 2.582-2.504 4.187-5.993 4.187-9.875 0-3.883-1.605-7.372-4.187-9.875-.321-.282-.426-.739-.266-1.133.164-.395.559-.641.984-.617h.094zM1.178 15.531c.121.02.238.063.344.125 2.633 1.414 4.437 4.215 4.437 7.407 0 3.195-1.797 5.996-4.437 7.406-.492.258-1.102.07-1.36-.422-.257-.492-.07-1.102.422-1.359 2.012-1.075 3.375-3.176 3.375-5.625 0-2.446-1.371-4.551-3.375-5.625-.441-.204-.676-.692-.551-1.165.122-.468.567-.785 1.051-.742h.094z"></path></svg><div class="business-card-number"><div class="business-section">Akilar</div><div class="business-section">589330978</div></div><div class="business-end"><span class="business-end-text">created:</span><span class="business-end-date">14/10/2022</span></div><div class="business-card-holder">Welcome to Candyhome</div><div class="business-master"><div class="business-circle business-master-red"></div><div class="business-circle business-master-yellow"></div></div></div><div class="business-back"><div class="business-strip-black"></div><div class="business-ccv"><label>sitelink</label><div><a target="_blank" rel="noopener external nofollow noreferrer" href="https://jq.qq.com/?_wv=1027&k=5o4Iga8D">加入群聊【🧊Akilarの糖果屋🍭】</a></div></div><div class="business-terms"><p>Use this card to join the candyhome and participate in a pleasant discussion together .</p><p>Welcome to Akilar's candyhome,wish you a nice day .</p></div></div></div></div></div><hr><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i> <span>评论</span></div></div><div class="comment-wrap"><div><div id="twikoo-wrap"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-author"><div class="item-headline"><i class="fa-solid fa-circle-user"></i><span>作者信息</span></div><div class="author-main-content"><div class="author-check-content"><label class="author-info" for="author-info"><input id="author-info" type="checkbox" name="author-info"><div class="author-avatar"><img src="" data-lazy-src="https://npm.elemecdn.com/akiblog@1.0.1/img/author.webp" onerror='this.onerror=null,this.src="https://npm.elemecdn.com/akiblog@1.0.1/img/404.gif"' alt="avatar"></div><div class="author-name">Akilar</div></label></div><div class="author-switch-content"><input class="switch-content" type="radio" name="switch-content" value="description"><label class="author-description-box"><div class="author-description">流水幽吟绕耳边，<br>煦风馨语抚心弦，<br>挥臂欲揽冰钩月，<br>银星斟酌醉人涎。</div></label><input class="switch-content" type="radio" name="switch-content" value="social" checked><label class="author-social-box"><a class="card-author-button" target="_blank" rel="noopener external nofollow noreferrer" href="https://jq.qq.com/?_wv=1027&amp;k=tNuEdliQ"><i class="fa fa-paper-plane faa-tada"></i><span>加入糖果屋群聊</span></a><div class="social-icons"><a class="social-icon faa-parent animated-hover" href="https://github.com/Akilarlxh" rel="external nofollow noreferrer" target="_blank" title="Github"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-identity-01"></use></svg></a><a class="social-icon faa-parent animated-hover" href="mailto:Akilarlxh@gmail.com" rel="external nofollow noreferrer" target="_blank" title="Email"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-Openmail-01"></use></svg></a><a class="social-icon faa-parent animated-hover" href="https://space.bilibili.com/22976782" rel="external nofollow noreferrer" target="_blank" title="Bilibili"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-film-01"></use></svg></a><a class="social-icon faa-parent animated-hover" href="https://music.163.com/#/user/home?id=292643778" rel="external nofollow noreferrer" target="_blank" title="Cloudmusic"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-songlist-01"></use></svg></a><a class="social-icon faa-parent animated-hover" href="/atom.xml" target="_blank" title="RSS"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-pushpin-01"></use></svg></a></div></label><input class="switch-content" type="radio" name="switch-content" value="site-data"><label class="author-data-box"><div class="site-data"><a class="data-item" href="/archives/"><div class="data-name">文章</div><div class="data-length">480</div></a><a class="data-item" href="/tags/"><div class="data-name">标签</div><div class="data-length">63</div></a><a class="data-item" href="/categories/"><div class="data-name">分类</div><div class="data-length">6</div></a></div></label></div></div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%86%99%E5%9C%A8%E6%9C%80%E5%89%8D"><span class="toc-number">1.</span> <span class="toc-text">写在最前</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%B7%A6%E4%B8%8A%E8%A7%92%E7%AB%99%E7%82%B9%E6%A0%87%E9%A2%98"><span class="toc-number">2.</span> <span class="toc-text">左上角站点标题</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%89%93%E8%B5%8F%E6%8C%89%E9%92%AE%E6%8A%95%E5%B8%81%E5%BD%A9%E8%9B%8B%E6%95%88%E6%9E%9C"><span class="toc-number">3.</span> <span class="toc-text">打赏按钮投币彩蛋效果</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E9%A1%B5%E8%84%9A%E6%8C%AF%E7%BF%85%E8%9D%B4%E8%9D%B6%E5%8A%A8%E6%95%88"><span class="toc-number">4.</span> <span class="toc-text">页脚振翅蝴蝶动效</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%B0%81%E9%9D%A2%E8%8A%82%E6%97%A5%E6%8C%82%E4%BB%B6%E6%95%88%E6%9E%9C"><span class="toc-number">5.</span> <span class="toc-text">封面节日挂件效果</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%AF%8F%E9%A1%B5%E5%8D%95%E7%8B%AC%E9%85%8D%E7%BD%AE%E8%83%8C%E6%99%AF%E5%9B%BE"><span class="toc-number">6.</span> <span class="toc-text">每页单独配置背景图</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E9%85%8D%E7%BD%AE%E6%89%8B%E6%9C%BAPC%E9%A1%B5%E9%9D%A2%E7%99%BD%E5%A4%A9%E9%BB%91%E5%A4%9C%E5%85%B1%E5%9B%9B%E4%B8%AA%E8%83%8C%E6%99%AF%E5%9B%BE"><span class="toc-number">7.</span> <span class="toc-text">配置手机PC页面白天黑夜共四个背景图</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%8F%9C%E5%8D%95%E6%A0%8F%E5%A4%9A%E8%89%B2%E5%9B%BE%E6%A0%87%E9%85%8D%E7%BD%AE%E6%95%99%E7%A8%8B"><span class="toc-number">8.</span> <span class="toc-text">菜单栏多色图标配置教程</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Social%E5%8D%A1%E7%89%87%E5%BD%A9%E8%89%B2%E5%9B%BE%E6%A0%87%E5%BC%95%E5%85%A5"><span class="toc-number">9.</span> <span class="toc-text">Social卡片彩色图标引入</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E9%A6%96%E9%A1%B5%E9%A1%B5%E7%A0%81%E6%A0%B7%E5%BC%8F%E8%B0%83%E6%95%B4"><span class="toc-number">10.</span> <span class="toc-text">首页页码样式调整</span></a></li></ol></div></div><div class="card-widget card-recommend-post"><div class="item-headline"><i class="fas fa-dharmachakra"></i><span>相关推荐</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/posts/f08df520/" title="重写了一个侧栏作者卡片。搭配侧栏卡片修改一起使用。"><img src="" data-lazy-src="https://img.zcool.cn/community/01a6b161e1626511013f01cd9953a2.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,q_100" alt="重写了一个侧栏作者卡片。搭配侧栏卡片修改一起使用。"></a><div class="content"><a class="title" href="/posts/f08df520/" title="源计划-方舟：作者卡片">源计划-方舟：作者卡片</a><time datetime="2022-12-31" title="发表于 2022-12-31">2022-12-31</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/70bdebb6/" title="新版的赛博风格侧栏版块，不包括作者卡片，作者卡片准备单独写"><img src="" data-lazy-src="https://img.zcool.cn/community/0183d061dd8ce511013e8cd04451eb.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,q_100" alt="新版的赛博风格侧栏版块，不包括作者卡片，作者卡片准备单独写"></a><div class="content"><a class="title" href="/posts/70bdebb6/" title="源计划-方舟：侧栏卡片样式修改">源计划-方舟：侧栏卡片样式修改</a><time datetime="2022-12-25" title="发表于 2022-12-25">2022-12-25</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/89a3474c/" title="给电脑端和手机端分别写了款侧栏按钮样式。也可以自己挑其中之一全局应用。"><img src="" data-lazy-src="https://img.zcool.cn/community/01729c61dd8ce711013f01cd0f12a3.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,q_100" alt="给电脑端和手机端分别写了款侧栏按钮样式。也可以自己挑其中之一全局应用。"></a><div class="content"><a class="title" href="/posts/89a3474c/" title="源计划-方舟：侧栏按钮样式修改">源计划-方舟：侧栏按钮样式修改</a><time datetime="2022-12-26" title="发表于 2022-12-26">2022-12-26</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/934cd448/" title="侧栏标签卡片和标签页面改动。换成存储卡样式。"><img src="" data-lazy-src="https://img.zcool.cn/community/01729c61dd8ce711013f01cd0f12a3.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,q_100" alt="侧栏标签卡片和标签页面改动。换成存储卡样式。"></a><div class="content"><a class="title" href="/posts/934cd448/" title="源计划-方舟：存储卡样式标签">源计划-方舟：存储卡样式标签</a><time datetime="2023-01-04" title="发表于 2023-01-04">2023-01-04</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/3e4b194c/" title="试做中较为满意的标题样式风格，单独发文"><img src="" data-lazy-src="https://img.zcool.cn/community/0125fe61e57b6111013e8cd04af4a2.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,q_100" alt="试做中较为满意的标题样式风格，单独发文"></a><div class="content"><a class="title" href="/posts/3e4b194c/" title="源计划-方舟：标题样式修改">源计划-方舟：标题样式修改</a><time datetime="2022-12-25" title="发表于 2022-12-25">2022-12-25</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/3b78b69a/" title="给Butterfly魔改的内容添加pjax适配。得益于已经有内置的方法函数，可以快速配置。"><img src="" data-lazy-src="https://img.zcool.cn/community/01ad1261e1626511013e8cd01221da.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,q_100" alt="给Butterfly魔改的内容添加pjax适配。得益于已经有内置的方法函数，可以快速配置。"></a><div class="content"><a class="title" href="/posts/3b78b69a/" title="Butterfly的Pjax适配方案">Butterfly的Pjax适配方案</a><time datetime="2020-11-18" title="发表于 2020-11-18">2020-11-18</time></div></div></div></div></div></div></main><footer id="footer"><div id="ark-footer-wraper"><div class="ark-footer-container"><div class="ark-footer-left-corner"><div id="ark-footer-bdage-container"><div class="ark-footer-bdage swiper-wrapper"><a class="ark-bdage-item swiper-slide" href="https://hexo.io/" rel="external nofollow noreferrer" title="博客框架为Hexo_v6.2.0" target="_blank"><svg class="icon ark-decoration" aria-hidden="true"><use xlink:href="#icon-hexo"></use></svg><span>Frame-Hexo</span></a><a class="ark-bdage-item swiper-slide" href="https://butterfly.js.org/" rel="external nofollow noreferrer" title="主题版本Butterfly_v4.4.0" target="_blank"><svg class="icon ark-decoration" aria-hidden="true"><use xlink:href="#icon-Butterfly"></use></svg><span>Theme-Butterfly</span></a><a class="ark-bdage-item swiper-slide" href="https://www.jsdelivr.com/" rel="external nofollow noreferrer" title="本站使用JsDelivr为静态资源提供CDN加速" target="_blank"><svg class="icon ark-decoration" aria-hidden="true"><use xlink:href="#icon-jsdelivr"></use></svg><span>CDN-jsDelivr</span></a><a class="ark-bdage-item swiper-slide" href="https://console.dogecloud.com/" rel="external nofollow noreferrer" title="本网站由多吉云提供CDN加速服务" target="_blank"><svg class="icon ark-decoration" aria-hidden="true"><use xlink:href="#icon-DOGE"></use></svg><span>CDN-dogecloud</span></a><a class="ark-bdage-item swiper-slide" href="https://beian.miit.gov.cn" title="本站已在工信部备案，备案号浙ICP备-2021026687号" target="_blank"><svg class="icon ark-decoration" aria-hidden="true"><use xlink:href="#icon-a-255_icp-license"></use></svg><span>ICP-2021026687-1</span></a><a class="ark-bdage-item swiper-slide" href="https://icp.gov.moe/?keyword=20212887" title="本站已加入萌ICP豪华套餐，萌ICP备20212887号" target="_blank"><svg class="icon ark-decoration" aria-hidden="true"><use xlink:href="#icon-space_demo_equipment"></use></svg><span>moeICP-20212887</span></a><a class="ark-bdage-item swiper-slide" href="https://www.netlify.com/" rel="external nofollow noreferrer" title="本站默认线路托管于Netlify" target="_blank"><svg class="icon ark-decoration" aria-hidden="true"><use xlink:href="#icon-netlify"></use></svg><span>Hosted-Netlify</span></a><a class="ark-bdage-item swiper-slide" href="https://github.com/" rel="external nofollow noreferrer" title="本站项目由Github托管" target="_blank"><svg class="icon ark-decoration" aria-hidden="true"><use xlink:href="#icon-GitHub"></use></svg><span>Source-Github</span></a><a class="ark-bdage-item swiper-slide" href="http://creativecommons.org/licenses/by-nc-sa/4.0/" rel="external nofollow noreferrer" title="本站采用知识共享署名-非商业性使用-相同方式共享4.0国际许可协议进行许可" target="_blank"><svg class="icon ark-decoration" aria-hidden="true"><use xlink:href="#icon-copyright"></use></svg><span>Copyright-BY-NC-SA-4</span></a></div></div><div class="ark-footer-copyright">&copy;2016 - 2023 By Akilar</div><a class="ark-footer-record" target="_blank" rel="noopener" href="https://beian.miit.gov.cn" title="浙ICP备-2021026687号">浙ICP备-2021026687号</a></div><div class="ark-footer-right-corner"><div id="workboard"></div><script async src="/js/custom/runtime.js"></script></div></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open faa-pulse animated-hover"></i><span>阅读模式</span></button><button id="translateLink" type="button" title="简繁转换"><i>繁</i><span>简繁转换</span></button><a class="icon-V hidden" onclick="switchNightMode()" title="昼夜切换"><svg class="faa-pulse animated-hover" width="25" height="25" viewBox="0 0 1024 1024"><use id="modeicon" xlink:href="#icon-moon"></use></svg><span>昼夜切换</span></a><button id="hide-aside-btn" type="button" title="侧栏显隐"><i class="fas fa-arrows-alt-h faa-pulse animated-hover"></i><span>侧栏显隐</span></button><button id="SAO_Utils_Switch" type="button" title="右键开关" onclick="panelAudio(),SAOSwitch()"><i class="fas fa-mouse faa-pulse animated-hover"></i><span>右键开关</span></button><button id="SAO_Utils_Refresh" type="button" title="点击刷新" onclick="panelAudio(),fetchCommits()"><i class="fa-solid fa-arrows-rotate faa-pulse animated-hover"></i><span>点击刷新</span></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin faa-pulse animated-hover"></i><span>设置</span></button><button id="ranklist_show" type="button" title="打赏榜单" onclick="panelAudio(),RanklistBtn()"><i class="fas fa-fire-alt faa-pulse animated-hover"></i><span>打赏榜单</span></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul faa-pulse animated-hover"></i><span>目录</span></button><button id="chat_btn" type="button" title="与我联系"><i class="fas fa-sms faa-pulse animated-hover"></i><span>与我联系</span></button><button id="to_comment" type="button" title="直达评论" onclick="FixedCommentBtn()"><i class="fas fa-comments faa-pulse animated-hover"></i><span>直达评论</span></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up faa-pulse animated-hover"></i><span>回到顶部</span></button></div></div><div id="algolia-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="search-wrap"><div id="algolia-search-input"></div><hr><div id="algolia-search-results"><div id="algolia-hits"></div><div id="algolia-pagination"></div><div id="algolia-info"><div class="algolia-stats"></div><div class="algolia-poweredBy"></div></div></div></div></div><div id="search-mask"></div></div><div><script async src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/async.js"></script><script src="https://npm.elemecdn.com/akiblog@1.0.1/js/utils.js"></script><script src="https://npm.elemecdn.com/akiblog@1.0.1/js/main.js"></script><script defer src="https://npm.elemecdn.com/swiper@8.4.2/swiper-bundle.min.js"></script><script defer data-pjax src="/js/custom/swiper_init.js"></script><script src="https://npm.elemecdn.com/akiblog@1.0.1/js/tw_cn.js"></script><script src="https://npm.elemecdn.com/medium-zoom@1.0.6/dist/medium-zoom.min.js"></script><script src="https://npm.elemecdn.com/instant.page@5.1.1/instantpage.js" type="module"></script><script src="https://npm.elemecdn.com/vanilla-lazyload@17.3.1/dist/lazyload.iife.min.js"></script><script src="https://npm.elemecdn.com/node-snackbar@0.1.16/dist/snackbar.min.js"></script><script src="https://npm.elemecdn.com/algoliasearch@4.14.2/dist/algoliasearch-lite.umd.js"></script><script src="https://npm.elemecdn.com/instantsearch.js@4.44.0/dist/instantsearch.production.min.js"></script><script src="https://npm.elemecdn.com/akiblog@1.0.1/js/search/algolia.js"></script><div class="pjax-reload"><script async>var preloader={endLoading:()=>{if(document.body.style.overflow="auto",document.getElementById("loading-box").style.transition="opacity 3s",document.getElementById("loading-box").style.opacity="0",setTimeout((function(){document.getElementById("loading-box").classList.add("loaded")}),3e3),sessionStorage.getItem("isReload"))return!0;sessionStorage.setItem("isReload",!0),SAONotify("Welcome","欢迎光临糖果屋<br>愿你享受愉快的一天")},initLoading:()=>{document.body.style.overflow="",document.getElementById("loading-box").style.transition="",document.getElementById("loading-box").style.opacity="1",document.getElementById("loading-box").classList.remove("loaded")}};window.addEventListener("load",()=>{preloader.endLoading()}),document.getElementById("loading-box").addEventListener("click",()=>{preloader.endLoading()}),setTimeout((function(){preloader.endLoading()}),3e3)</script></div><div class="js-pjax"><script>(()=>{const t=()=>{twikoo.init(Object.assign({el:"#twikoo-wrap",envId:"https://twikoo-service.akilar.top",region:"",onCommentLoaded:function(){btf.loadLightbox(document.querySelectorAll("#twikoo .tk-content img:not(.tk-owo-emotion)"))}},null))},o=()=>{"object"!=typeof twikoo?getScript("https://npm.elemecdn.com/twikoo@1.6.5/dist/twikoo.all.min.js").then(t):setTimeout(t,0)};btf.loadComment(document.getElementById("twikoo-wrap"),o)})()</script></div><script>window.addEventListener("load",()=>{const e=e=>{let t="";if(e.length)for(let n=0;n<e.length;n++){t+="<div class='aside-list-item'>";{const a="data-lazy-src";t+=`<a href='${e[n].url}' class='thumbnail'><img ${a}='${e[n].avatar}' alt='${e[n].nick}'></a>`}t+=`<div class='content'>\n        <a class='comment' href='${e[n].url}' title='${e[n].content}'>${e[n].content}</a>\n        <div class='name'><span>${e[n].nick} / </span><time datetime="${e[n].date}">${btf.diffDate(e[n].date,!0)}</time></div>\n        </div></div>`}else t+="没有评论";let n=document.querySelector("#card-newest-comments .aside-list");n.innerHTML=t,window.lazyLoadInstance&&window.lazyLoadInstance.update(),window.pjax&&window.pjax.refresh(n)},t=()=>{if(document.querySelector("#card-newest-comments .aside-list")){const t=saveToLocal.get("twikoo-newest-comments");t?e(JSON.parse(t)):(()=>{const t=()=>{twikoo.getRecentComments({envId:"https://twikoo-service.akilar.top",region:"",pageSize:5,includeReply:!0}).then((function(t){const n=t.map(e=>{return{content:(t=e.comment,""===t||(t=(t=(t=(t=t.replace(/<img.*?src="(.*?)"?[^\>]+>/gi,"[图片]")).replace(/<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi,"[链接]")).replace(/<pre><code>.*?<\/pre>/gi,"[代码]")).replace(/<[^>]+>/g,"")).length>150&&(t=t.substring(0,150)+"..."),t),avatar:e.avatar,nick:e.nick,url:e.url+"#"+e.id,date:new Date(e.created).toISOString()};var t});saveToLocal.set("twikoo-newest-comments",JSON.stringify(n),10/1440),e(n)})).catch((function(e){document.querySelector("#card-newest-comments .aside-list").innerHTML="无法获取评论，请确认相关配置是否正确"}))};"object"==typeof twikoo?t():getScript("https://npm.elemecdn.com/twikoo@1.6.5/dist/twikoo.all.min.js").then(t)})()}};t(),document.addEventListener("pjax:complete",t)})</script><script src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/sun_moon.js" async></script><script async data-pjax src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/SAO-NAV.js"></script><script>WIDGET={CONFIG:{modules:"012",background:"5",tmpColor:"FFFFFF",tmpSize:"16",cityColor:"FFFFFF",citySize:"16",aqiColor:"FFFFFF",aqiSize:"16",weatherIconSize:"24",alertIconSize:"18",padding:"10px 10px 10px 10px",shadow:"0",language:"auto",fixed:"false",vertical:"top",horizontal:"left",key:"3da94e567f5e4e88baf90f066f0893c2"}}</script><script defer data-pjax src="https://widget.heweather.net/simple/static/js/he-simple.js?v=1.4.0"></script><script async src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/random.js"></script><script defer src="https://at.alicdn.com/t/c/font_3344355_e443xsjcmum.js"></script><script src="//code.tidio.co/wgamdwbirypo8casl6rjgtfbs47ny3s7.js" async></script><script>function onTidioChatApiReady(){window.tidioChatApi.hide(),window.tidioChatApi.on("close",(function(){window.tidioChatApi.hide()}))}window.tidioChatApi?window.tidioChatApi.on("ready",onTidioChatApiReady):document.addEventListener("tidioChat-ready",onTidioChatApiReady);var chatBtnFn=()=>{document.getElementById("chat_btn").addEventListener("click",(function(){window.tidioChatApi.show(),window.tidioChatApi.open()}))};chatBtnFn()</script><script src="https://npm.elemecdn.com/pjax@0.2.8/pjax.min.js"></script><script>let pjaxSelectors=["head > title","#config-diff","#body-wrap","#rightside-config-hide","#rightside-config-show",".js-pjax","#web_bg","#fixedcard-dashboard"];var pjax=new Pjax({elements:'a:not([target="_blank"])',selectors:pjaxSelectors,cacheBust:!1,analytics:!1,scrollRestoration:!1});document.addEventListener("pjax:send",(function(){if(window.tocScrollFn&&window.removeEventListener("scroll",window.tocScrollFn),window.scrollCollect&&window.removeEventListener("scroll",scrollCollect),"object"==typeof preloader&&preloader.initLoading(),document.getElementById("rightside").style.cssText="opacity: ''; transform: ''",window.aplayers)for(let e=0;e<window.aplayers.length;e++)window.aplayers[e].options.fixed||window.aplayers[e].destroy();"object"==typeof typed&&typed.destroy();const e=document.body.classList;e.contains("read-mode")&&e.remove("read-mode"),"object"==typeof disqusjs&&disqusjs.destroy()})),document.addEventListener("pjax:complete",(function(){window.refreshFn(),document.querySelectorAll("script[data-pjax], .pjax-reload script").forEach(e=>{const t=document.createElement("script"),o=e.text||e.textContent||e.innerHTML||"";Array.from(e.attributes).forEach(e=>t.setAttribute(e.name,e.value)),t.appendChild(document.createTextNode(o)),e.parentNode.replaceChild(t,e)}),GLOBAL_CONFIG.islazyload&&window.lazyLoadInstance.update(),"function"==typeof chatBtnFn&&chatBtnFn(),"function"==typeof panguInit&&panguInit(),"function"==typeof gtag&&gtag("config","",{page_path:window.location.pathname}),"object"==typeof _hmt&&_hmt.push(["_trackPageview",window.location.pathname]),"function"==typeof loadMeting&&document.getElementsByClassName("aplayer").length&&loadMeting(),"object"==typeof Prism&&Prism.highlightAll(),"object"==typeof preloader&&preloader.endLoading()})),document.addEventListener("pjax:error",e=>{404===e.request.status&&pjax.loadUrl("/404.html")})</script><script>"serviceWorker"in navigator&&(navigator.serviceWorker.controller&&navigator.serviceWorker.addEventListener("controllerchange",(function(){fetch("/json/commits.json").then(e=>e.json().then(e=>{for(var r=e,o=0;o<r.length;o++){r[o];var t=o+1+"."+r[o].commit.message;if(o<1)var n=t;else n=n+"<br>"+t}SAONotify("Latest Update",n,"location.reload(true);")})).catch(console.error)})),window.addEventListener("load",(function(){navigator.serviceWorker.register("/sw.js")})))</script><div id="SAO-back"><div id="SAO-menu"><div id="SAO-menu-content"><div class="utils-list"><div class="utils-list-item"><div class="user-panel" style="top:undefined"><div class="user-panel-name">Friends</div><div class="user-panel-img"><img src="" data-lazy-src="/img/info.png"></div><div class="user-panel-properties">Welcome to Akilar の Candyhome !</div></div><i class="fas fa-address-book" onclick="panelAudio(),UtilsClick()"></i><div class="menu-list" style="top:-83px"><div class="menu-list-item"><i class="fa fa-link" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("/link/")}),500)'>Link</i></div><div class="menu-list-item"><i class="fas fa-fire-alt" onclick="clickAudio(),setTimeout((function(){SAOclose(),RanklistBtn()}),500)">Pantner</i></div></div></div><div class="utils-list-item"><div class="user-panel" style="top:undefined"><div class="user-panel-name">Help</div><div class="user-panel-img"><img src="" data-lazy-src="/img/info.png"></div><div class="user-panel-properties"><h4>Anything can I help you ?</h4><p>Tidio：开启在线聊天窗<br>Comment：直达评论区或留言板<br>Candyhome：加入糖果屋QQ群</p></div></div><i class="fa fa-question-circle" onclick="panelAudio(),UtilsClick()"></i><div class="menu-list" style="top:-103px"><div class="menu-list-item"><i class="fa fa-comment-dots" onclick="clickAudio(),setTimeout((function(){SAOclose(),openTidio()}),500)">Tidio</i></div><div class="menu-list-item"><i class="fa fa-comments" onclick="clickAudio(),setTimeout((function(){SAOclose(),FixedCommentBtn()}),500)">Comments</i></div><div class="menu-list-item"><i class="fa fa-user-friends" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("https://jq.qq.com/?_wv=1027&amp;k=a08BZRzs")}),500)'>Candyhome</i></div></div></div><div class="utils-list-item"><div class="user-panel" style="top:undefined"><div class="user-panel-name">Menu</div><div class="user-panel-img"><img src="" data-lazy-src="/img/info.png"></div><div class="user-panel-properties">The menu of my blog</div></div><i class="fa fa-tasks" onclick="panelAudio(),UtilsClick()"></i><div class="menu-list" style="top:-163px"><div class="menu-list-item"><i class="fa fa-home" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("https://blog.akilar.top/")}),500)'>Home</i></div><div class="menu-list-item"><i class="fa fa-folder-open" onclick="panelAudio(),MenusClick()">Document</i><div class="menu-child" style="top:-100px"><div class="menu-list-child"><i class="fa fa-file-invoice" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("/posts/f99b208/")}),500)'>Beautify</i></div><div class="menu-list-child"><i class="fa fa-file-invoice" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("/posts/7c16c4bb/")}),500)'>Optimize</i></div><div class="menu-list-child"><i class="fa fa-file-invoice" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("/posts/615e2dec/")}),500)'>Tag_Plugins</i></div><div class="menu-list-child"><i class="fa fa-file-invoice" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("/posts/6ef63e2d/")}),500)'>Construct</i></div></div></div><div class="menu-list-item"><i class="fa fa-blog" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("/")}),500)'>Blog</i></div><div class="menu-list-item"><i class="fa fa-archive" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("/archives/")}),500)'>Archives</i></div><div class="menu-list-item"><i class="fa fa-folder-open" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("/categories/")}),500)'>Categoties</i></div><div class="menu-list-item"><i class="fa fa-tags" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("/tags/")}),500)'>Tags</i></div></div></div><div class="utils-list-item"><div class="user-panel" style="top:undefined"><div class="user-panel-name">Options</div><div class="user-panel-img"><img src="" data-lazy-src="/img/info.png"></div><div class="user-panel-properties"><h4>Some userful scripts</h4><p>Random： 随机跳转站内文章<br>Search： 打开搜索窗口</p>Refresh： 刷新缓存</div></div><i class="fa fa-tools" onclick="panelAudio(),UtilsClick()"></i><div class="menu-list" style="top:-103px"><div class="menu-list-item"><i class="fa fa-random" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("/toRandomPost()")}),500)'>Random</i></div><div class="menu-list-item"><i class="fa fa-search" onclick="clickAudio(),setTimeout((function(){SAOclose(),openSearch()}),500)">Search</i></div><div class="menu-list-item"><i class="fa-solid fa-arrows-rotate" onclick='clickAudio(),setTimeout((function(){SAOclose(),SAONotify("Refresh","即将为您刷新页面缓存","location.reload(true);")}),500)'>Refresh</i></div></div></div><div class="utils-list-item"><div class="user-panel"><div class="user-panel-name">Instructions</div><div class="user-panel-img"><img src="" data-lazy-src="/img/siteicon/favicon.png"></div><div class="user-panel-properties"><h4>欢迎使用SAO_Utils_Web 2.0</h4><p>点按选项可以持续显示下级菜单。您可以通过按住<kbd>ctrl</kbd>+<kbd>右键</kbd>来恢复使用原生右键菜单，更多内容可点击右侧Option按钮访问教程或Help按钮加入糖果屋QQ群。</p><center>©Akilarの糖果屋</center></div></div><i class="fa fa-cog" onclick="panelAudio(),UtilsClick()"></i><div class="menu-list" style="top:-103px"><div class="menu-list-item"><i class="fa fa-tools" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("https://akilar.top/posts/fd243d7/")}),500)'>Option</i></div><div class="menu-list-item"><i class="fa fa-question-circle" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("https://jq.qq.com/?_wv=1027&amp;k=a08BZRzs")}),500)'>Help</i></div><div class="menu-list-item"><i class="fa fa-sign-out-alt" onclick="alertAudio(),openLogout()">Logout</i></div></div></div><div class="utils-list-item"><i class="fa fa-power-off" onclick="alertAudio(),SAOKeepOff()" title="永久关闭SAO右键菜单"></i></div></div></div></div></div><div id="SAO-logout"><div class="logout-title">Alert</div><div class="logout-alert">是否确认退出?</div><div class="logout-button"><span class="logout-confirm"><button class="far fa-circle" type="button" name="confirm" onclick="clickAudio(),confirmLogout()"></button></span><span class="logout-cancel"><button class="fa fa-times" type="button" name="cancel" onclick="panelAudio(),cancelLogout()"></button></span></div></div><audio id="SAOlauncher" src="https://npm.elemecdn.com/akilar-candyassets/audio/Launcher.mp3"></audio><audio id="SAOClick" src="https://npm.elemecdn.com/akilar-candyassets/audio/Click.mp3"></audio><audio id="SAOPanel" src="https://npm.elemecdn.com/akilar-candyassets/audio/Panel.mp3"></audio><audio id="SAOAlert" src="https://npm.elemecdn.com/akilar-candyassets/audio/Alert.mp3"></audio><script async src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/SAO_Menu.js"></script><div id="SAO-ranklist"><div class="ranklist-title">Rank list</div><div class="ranklist-main"><div class="master-item"><div class="master-rank"><i class="fa fa-plus" onclick="panelAudio(),RanklistBtn()"></i></div><div class="master-user"><a alt="" href="/">Akilar<div class="rank-reward"><div class="reward-img"><img alt="" src="" data-lazy-src="https://npm.elemecdn.com/akiblog@1.0.1/img/wechat.png"><a class="reward-text" alt="" href="/null">wechat</a></div><div class="reward-img"><img alt="" src="" data-lazy-src="https://npm.elemecdn.com/akiblog@1.0.1/img/alipay.png"><a class="reward-text" alt="" href="/null">alipay</a></div></div></a></div><div class="master-data"><div class="master-HP"><div class="HP-fill" style="width:20%"><div class="HP-fill-in"><span>20%</span></div></div></div></div><div class="master-level"><span>270</span><span>|</span><span>1350</span><span>lv.23</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢*蓓打赏的￥180">*蓓</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:100%"><div class="HP-fill-in"><span>100.00%</span></div></div></div></div><div class="partner-level"><span>9200</span><span>|</span><span>9200</span><span>lv.180</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢晨打赏的￥8.88">晨</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:88.86%"><div class="HP-fill-in"><span>88.86%</span></div></div></div></div><div class="partner-level"><span>622</span><span>|</span><span>700</span><span>lv.10</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://zfe.space/" data-title="感谢**鄂打赏的￥9.9">**鄂</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:13.76%"><div class="HP-fill-in"><span>13.76%</span></div></div></div></div><div class="partner-level"><span>523</span><span>|</span><span>3800</span><span>lv.72</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢*光打赏的￥50">*光</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:92.59%"><div class="HP-fill-in"><span>92.59%</span></div></div></div></div><div class="partner-level"><span>2685</span><span>|</span><span>2900</span><span>lv.54</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢*洁打赏的￥30">*洁</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:93.78%"><div class="HP-fill-in"><span>93.78%</span></div></div></div></div><div class="partner-level"><span>1688</span><span>|</span><span>1800</span><span>lv.32</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢**焘打赏的￥20">**焘</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:90.92%"><div class="HP-fill-in"><span>90.92%</span></div></div></div></div><div class="partner-level"><span>1182</span><span>|</span><span>1300</span><span>lv.22</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://szsyzx.github.io/" data-title="感谢懒蟲打赏的￥20">懒蟲</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:74.06%"><div class="HP-fill-in"><span>74.06%</span></div></div></div></div><div class="partner-level"><span>1148</span><span>|</span><span>1550</span><span>lv.27</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢*i打赏的￥10">*i</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:83.38%"><div class="HP-fill-in"><span>83.38%</span></div></div></div></div><div class="partner-level"><span>667</span><span>|</span><span>800</span><span>lv.12</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://www.acozycotage.net/" data-title="感谢acozycotage打赏的￥10">acozycotage</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:NaN%"><div class="HP-fill-in"><span>NaN%</span></div></div></div></div><div class="partner-level"><span>NaN</span><span>|</span><span>NaN</span><span>lv.undefined</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢*因打赏的￥10">*因</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:62.5%"><div class="HP-fill-in"><span>62.50%</span></div></div></div></div><div class="partner-level"><span>625</span><span>|</span><span>1000</span><span>lv.16</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢H*g打赏的￥10">H*g</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:83.38%"><div class="HP-fill-in"><span>83.38%</span></div></div></div></div><div class="partner-level"><span>667</span><span>|</span><span>800</span><span>lv.12</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢**宁打赏的￥10">**宁</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:45.46%"><div class="HP-fill-in"><span>45.46%</span></div></div></div></div><div class="partner-level"><span>591</span><span>|</span><span>1300</span><span>lv.22</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://www.nesxc.com/" data-title="感谢Nesxc打赏的￥14.88">Nesxc</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:74.42%"><div class="HP-fill-in"><span>74.42%</span></div></div></div></div><div class="partner-level"><span>893</span><span>|</span><span>1200</span><span>lv.20</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢J*y打赏的￥2.56">J*y</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:51.11%"><div class="HP-fill-in"><span>51.11%</span></div></div></div></div><div class="partner-level"><span>230</span><span>|</span><span>450</span><span>lv.5</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://www.lbihua.cn" data-title="感谢哔哗打赏的￥10">哔哗</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:62.5%"><div class="HP-fill-in"><span>62.50%</span></div></div></div></div><div class="partner-level"><span>625</span><span>|</span><span>1000</span><span>lv.16</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://iori-yimaga.top" data-title="感谢T*0打赏的￥23.3">T*0</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:93.17%"><div class="HP-fill-in"><span>93.17%</span></div></div></div></div><div class="partner-level"><span>1351</span><span>|</span><span>1450</span><span>lv.25</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢**飞打赏的￥20">**飞</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:74.06%"><div class="HP-fill-in"><span>74.06%</span></div></div></div></div><div class="partner-level"><span>1148</span><span>|</span><span>1550</span><span>lv.27</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢**豪打赏的￥10">**豪</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:83.38%"><div class="HP-fill-in"><span>83.38%</span></div></div></div></div><div class="partner-level"><span>667</span><span>|</span><span>800</span><span>lv.12</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://www.keyiqingxin.cn" data-title="感谢清心打赏的￥3.88">清心</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:19.42%"><div class="HP-fill-in"><span>19.42%</span></div></div></div></div><div class="partner-level"><span>233</span><span>|</span><span>1200</span><span>lv.20</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢鹿栖打赏的￥20">鹿栖</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:74.06%"><div class="HP-fill-in"><span>74.06%</span></div></div></div></div><div class="partner-level"><span>1148</span><span>|</span><span>1550</span><span>lv.27</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://menglei.xyz" data-title="感谢*夢打赏的￥3">*夢</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:27.33%"><div class="HP-fill-in"><span>27.33%</span></div></div></div></div><div class="partner-level"><span>205</span><span>|</span><span>750</span><span>lv.11</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://www.ijinse.cn" data-title="感谢锦瑟打赏的￥50">锦瑟</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:69.45%"><div class="HP-fill-in"><span>69.45%</span></div></div></div></div><div class="partner-level"><span>2639</span><span>|</span><span>3800</span><span>lv.72</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://glann.vip" data-title="感谢glann打赏的￥5.01">glann</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:41.75%"><div class="HP-fill-in"><span>41.75%</span></div></div></div></div><div class="partner-level"><span>334</span><span>|</span><span>800</span><span>lv.12</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢**忠打赏的￥4.48">**忠</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:89.56%"><div class="HP-fill-in"><span>89.56%</span></div></div></div></div><div class="partner-level"><span>403</span><span>|</span><span>450</span><span>lv.5</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://huran.xyz" data-title="感谢忽然打赏的￥13.14">忽然</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:87.58%"><div class="HP-fill-in"><span>87.58%</span></div></div></div></div><div class="partner-level"><span>832</span><span>|</span><span>950</span><span>lv.15</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢XueZha打赏的￥6.66">XueZha</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:66.57%"><div class="HP-fill-in"><span>66.57%</span></div></div></div></div><div class="partner-level"><span>466</span><span>|</span><span>700</span><span>lv.10</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢*葵打赏的￥6.66">*葵</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:66.57%"><div class="HP-fill-in"><span>66.57%</span></div></div></div></div><div class="partner-level"><span>466</span><span>|</span><span>700</span><span>lv.10</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://tianli-blog.club" data-title="感谢天利打赏的￥40.34">天利</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:77.57%"><div class="HP-fill-in"><span>77.57%</span></div></div></div></div><div class="partner-level"><span>2172</span><span>|</span><span>2800</span><span>lv.52</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://bingmeng158.github.io" data-title="感谢冰梦打赏的￥1.5">冰梦</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:30%"><div class="HP-fill-in"><span>30.00%</span></div></div></div></div><div class="partner-level"><span>135</span><span>|</span><span>450</span><span>lv.5</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://0410wzn.top" data-title="感谢WZN打赏的￥1.35">WZN</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:27.11%"><div class="HP-fill-in"><span>27.11%</span></div></div></div></div><div class="partner-level"><span>122</span><span>|</span><span>450</span><span>lv.5</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢KD打赏的￥1.5">KD</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:30%"><div class="HP-fill-in"><span>30.00%</span></div></div></div></div><div class="partner-level"><span>135</span><span>|</span><span>450</span><span>lv.5</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢**庆打赏的￥3.5">**庆</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:70%"><div class="HP-fill-in"><span>70.00%</span></div></div></div></div><div class="partner-level"><span>315</span><span>|</span><span>450</span><span>lv.5</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://www.sunguoqi.com" data-title="感谢小孙打赏的￥5.2">小孙</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:52%"><div class="HP-fill-in"><span>52.00%</span></div></div></div></div><div class="partner-level"><span>364</span><span>|</span><span>700</span><span>lv.10</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://blog.nalex.top" data-title="感谢rootlex打赏的￥4">rootlex</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:80%"><div class="HP-fill-in"><span>80.00%</span></div></div></div></div><div class="partner-level"><span>360</span><span>|</span><span>450</span><span>lv.5</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://dreamfall.cn" data-title="感谢梦落打赏的￥1.88">梦落</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:37.56%"><div class="HP-fill-in"><span>37.56%</span></div></div></div></div><div class="partner-level"><span>169</span><span>|</span><span>450</span><span>lv.5</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://blog.cyfan.top" data-title="感谢CYF打赏的￥1.5">CYF</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:30%"><div class="HP-fill-in"><span>30.00%</span></div></div></div></div><div class="partner-level"><span>135</span><span>|</span><span>450</span><span>lv.5</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢一悲打赏的￥2.5">一悲</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:41.6%"><div class="HP-fill-in"><span>41.60%</span></div></div></div></div><div class="partner-level"><span>208</span><span>|</span><span>500</span><span>lv.6</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://hexo.cf" data-title="感谢八神打赏的￥10">八神</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:83.38%"><div class="HP-fill-in"><span>83.38%</span></div></div></div></div><div class="partner-level"><span>667</span><span>|</span><span>800</span><span>lv.12</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://noionion.top" data-title="感谢贰猹打赏的￥20">贰猹</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:90.92%"><div class="HP-fill-in"><span>90.92%</span></div></div></div></div><div class="partner-level"><span>1182</span><span>|</span><span>1300</span><span>lv.22</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://blog.slqwq.cn" data-title="感谢Hajeekn打赏的￥10">Hajeekn</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:66.63%"><div class="HP-fill-in"><span>66.63%</span></div></div></div></div><div class="partner-level"><span>633</span><span>|</span><span>950</span><span>lv.15</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://baokan0.com" data-title="感谢baokan0打赏的￥20">baokan0</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:95.2%"><div class="HP-fill-in"><span>95.20%</span></div></div></div></div><div class="partner-level"><span>1190</span><span>|</span><span>1250</span><span>lv.21</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢h*d打赏的￥10">h*d</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:66.63%"><div class="HP-fill-in"><span>66.63%</span></div></div></div></div><div class="partner-level"><span>633</span><span>|</span><span>950</span><span>lv.15</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢**航打赏的￥10">**航</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:66.63%"><div class="HP-fill-in"><span>66.63%</span></div></div></div></div><div class="partner-level"><span>633</span><span>|</span><span>950</span><span>lv.15</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢I*u打赏的￥2">I*u</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:40%"><div class="HP-fill-in"><span>40.00%</span></div></div></div></div><div class="partner-level"><span>180</span><span>|</span><span>450</span><span>lv.5</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢7*i打赏的￥1">7*i</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:20%"><div class="HP-fill-in"><span>20.00%</span></div></div></div></div><div class="partner-level"><span>90</span><span>|</span><span>450</span><span>lv.5</span></div></div></div></div><script async src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/SAO_ranklist.js"></script><div class="pjax-reload"><script async>for(var arr=document.getElementsByClassName("recent-post-item"),i=0;i<arr.length;i++)arr[i].classList.add("wow"),arr[i].classList.add("animate__zoomIn"),arr[i].setAttribute("data-wow-duration",""),arr[i].setAttribute("data-wow-delay",""),arr[i].setAttribute("data-wow-offset",""),arr[i].setAttribute("data-wow-iteration","")</script><script async>for(var arr=document.getElementsByClassName("card-widget"),i=0;i<arr.length;i++)arr[i].classList.add("wow"),arr[i].classList.add("animate__zoomIn"),arr[i].setAttribute("data-wow-duration",""),arr[i].setAttribute("data-wow-delay",""),arr[i].setAttribute("data-wow-offset",""),arr[i].setAttribute("data-wow-iteration","")</script><script async>for(var arr=document.getElementsByClassName("article-sort-item"),i=0;i<arr.length;i++)arr[i].classList.add("wow"),arr[i].classList.add("animate__zoomIn"),arr[i].setAttribute("data-wow-duration",""),arr[i].setAttribute("data-wow-delay",""),arr[i].setAttribute("data-wow-offset",""),arr[i].setAttribute("data-wow-iteration","")</script><script async>for(var arr=document.getElementsByClassName("flink-list-card"),i=0;i<arr.length;i++)arr[i].classList.add("wow"),arr[i].classList.add("animate__flipInY"),arr[i].setAttribute("data-wow-duration","1s"),arr[i].setAttribute("data-wow-delay",""),arr[i].setAttribute("data-wow-offset",""),arr[i].setAttribute("data-wow-iteration","")</script></div><script defer src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/wow.min.js"></script><script defer src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/wow_init.js"></script><div id="fixedcard-dashboard"><button class="fixedcard-activebtn" type="button" title="用户信息" onclick="FixedCardWidget(&quot;class&quot;,&quot;card-author&quot;,&quot;0&quot;)"><i class="fas fa-address-book"></i></button><button class="fixedcard-activebtn" type="button" title="相关推荐" onclick="FixedCardWidget(&quot;class&quot;,&quot;card-recommend-post&quot;,&quot;0&quot;)"><i class="fas fa-dharmachakra"></i></button><div class="fixedcard-user-avatar fixedcard-activebtn" onclick="RemoveFixedCardWidget()"><img class="fixedcard-user-avatar-img" src="" data-lazy-src="https://npm.elemecdn.com/akiblog@1.0.1/img/author.webp" title="Akilar"></div></div><script defer data-pjax src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/fixed_card_widget.js"></script><script defer data-pjax src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/fixed_comment.js"></script></div><script>var fdata={apiurl:"/json/akifcircle.json",initnumber:20,stepnumber:10,error_img:"https://npm.elemecdn.com/akilar-candyassets/image/404.gif"};localStorage.setItem("fdatalist",JSON.stringify(fdata))</script><script defer src="https://npm.elemecdn.com/hexo-filter-fcircle/assets/js/fetch.js"></script><script data-pjax src="https://npm.elemecdn.com/hexo-filter-gitcalendar/lib/gitcalendar.js"></script><script data-pjax>function gitcalendar_injector_config(){document.getElementById("recent-posts").insertAdjacentHTML("afterbegin",'<div class="recent-post-item" id="gitcalendarBar" style="width:100%;height:auto;padding:10px;"><style>#git_container{min-height: 280px}@media screen and (max-width:650px) {#git_container{min-height: 0px}}</style><div id="git_loading" style="width:10%;height:100%;margin:0 auto;display: block;"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50" xml:space="preserve"><path fill="#d0d0d0" d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z" transform="rotate(275.098 25 25)"><animatetransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite"></animatetransform></path></svg><style>#git_container{display: none;}</style></div><div id="git_container"></div></div>'),console.log("已挂载gitcalendar")}document.getElementById("recent-posts")&&"/"===location.pathname&&(gitcalendar_injector_config(),GitCalendarInit("/json/akicalendar.json",["#e4dfd7","#f9f4dc","#f7e8aa","#f7e8aa","#f8df72","#fcd217","#fcc515","#f28e16","#fb8b05","#d85916","#f43e06"],"Akilarlxh"))</script></body></html>